How to deploy a template with AWS CLI
In Chapter 2, Hosting a Static Website on Amazon S3 Bucket, we used AWS CLI to create an S3 bucket as a static website. AWS CLI supports CloudFormation as well so that we can create a stack with only a command line.
Getting ready
As we have already used AWS CLI in Chapter 2, Hosting a Static Website on Amazon S3 Bucket, the requirement is the same as before. We just need to add a full CloudFront access policy for the IAM user. In order to use CloudFormation with AWS CLI, you need to meet the following requirements:
- Install and set up AWS CLI on your PC (http://aws.amazon.com/cli/)
- Configure an IAM user and a policy to enable full access to S3, full access to CloudFront, and issue an IAM credential.
Tip
For more information about how to install and set up AWS CLI, see https://github.com/aws/aws-cli.
On the other hand, one of the easiest ways to use AWS CLI is to launch Amazon AMI because AWS CLI is installed in the AMI by default.
How to do it…
After...