Skip to content

Instantly share code, notes, and snippets.

@vpack
Last active August 29, 2015 14:24
Show Gist options
  • Save vpack/132f4b8a684b14bdd932 to your computer and use it in GitHub Desktop.
Save vpack/132f4b8a684b14bdd932 to your computer and use it in GitHub Desktop.
AWS CloudFront CDN

Specify cache control for S3 content origin. When new content is pushed to S3, it gets refreshed in the edge servers in an hour without having to invalidate the content.

aws $PROFILE s3 cp content  s3://$BUCKET/ --recursive --exclude ".git/*" --cache-control max-age=3600

To invaliate all the static content in a CloudFront Distribution, use the pattern in the AWS Console.

/*

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment