Skip to content

Instantly share code, notes, and snippets.

@PharaohKJ
Last active November 27, 2016 04:18
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 PharaohKJ/ed2e889636126294bc87f0359a33a0fc to your computer and use it in GitHub Desktop.
Save PharaohKJ/ed2e889636126294bc87f0359a33a0fc to your computer and use it in GitHub Desktop.
cloudfront invalidation
$ cp template.json _amazon.json
$ cat _amazon.json
{
"DistributionId": "MY-DESTRIBUTION-ID",
"InvalidationBatch": {
"Paths": {
"Quantity": 1,
"Items": [
"/*"
]
},
"CallerReference": "__CRF__"
}
}
$ export CRF=`date +"%Y%m%d%H%M%S"` && sed -i "s/__CRF__/$CRF/g" _amazon.json && aws --profile octopress cloudfront create-invalidation --cli-input-json file://_amazon.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment