Skip to content

Instantly share code, notes, and snippets.

@kylegalbraith
Created September 15, 2018 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylegalbraith/8924b78c54a5652d47cb4085d407cda0 to your computer and use it in GitHub Desktop.
Save kylegalbraith/8924b78c54a5652d47cb4085d407cda0 to your computer and use it in GitHub Desktop.
buildspec.yml with Client Headers and CloudFront invalidation
version: 0.2
phases:
install:
commands:
- echo "install step"
pre_build:
commands:
- echo "pre_build step"
build:
commands:
- aws s3 cp . "s3://<your-static-website-bucket>" --recursive --cache-control 'public, max-age=2628000'
post_build:
commands:
- aws cloudfront create-invalidation --distribution-id <your-distribution-id> --paths '/*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment