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 ...

Get Amazon S3 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.