Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 772 Bytes

File metadata and controls

41 lines (27 loc) · 772 Bytes

terraform-cloudfront-ecs-s3

Cloudfront distribution + S3

In this stage we'll use Terraform to set up: - an S3 bucket configured to serve static files over the web - a Cloudfront distribution

Quick start

  1. Set environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

  2. Add two new variables to your .tfvars file:

    echo "xxx=yyy" >> ../
    
  3. Create the infrastructure

    ./create-infra.sh
    
  4. Upload a file to the static files S3 bucket.

    ./upload-static-file.sh
    
  5. Check that the file is available via the Cloudformation domain.

    curl http://dvibgn96rogbo.cloudfront.net/hello-world.txt
    
  6. Tear down the infrastructure.

    ./delete-infra.sh