Instagram Clone Cloud Formation Project
Deploy a highly available web application using CloudFormaiton and nested stacks.
Download and install the AWS CLI tool.
Example install on Ubuntu
sudo apt install unzip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Configure AWS CLI to connect to AWS
- Run aws configure
- Paste Access Key
- Paste Secret Key
- Choose default region
- Choose default output format
- Verify:
aws s3 ls
Create an S3 bucket to house your stack templates.
Copy the stack templates to your bucket. Example:
aws --region us-west-2 s3 cp webapp.yml s3://<your_bucket>/webapp.yml
Copy the udacity.zip file in UDAGRAM\app\files to your new bucket. Example:
aws --region us-west-2 s3 cp udacity.zip s3://<your_bucket>/udacity.zip
Use the following deploy-nested-stack.sh script found in UDAGRAM\scripts
aws cloudformation deploy \
--stack-name $1
--template-file $2 \
--capabilities CAPABILITY_NAMED_IAM
In order to delete the stack run the following command:
aws cloudformation delete-stack --stack-name <your_stack_name>