In this stage we'll use Terraform to set up: - an S3 bucket configured to serve static files over the web - a Cloudfront distribution
-
Set environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
-
Add two new variables to your .tfvars file:
echo "xxx=yyy" >> ../
-
Create the infrastructure
./create-infra.sh
-
Upload a file to the static files S3 bucket.
./upload-static-file.sh
-
Check that the file is available via the Cloudformation domain.
curl http://dvibgn96rogbo.cloudfront.net/hello-world.txt
-
Tear down the infrastructure.
./delete-infra.sh