Last active
May 7, 2019 04:18
-
-
Save diegofcornejo/477c05a19637906f953ad5fafa8dec8b to your computer and use it in GitHub Desktop.
Invalidate Multiple AWS Cloudfront Distributions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
distributions=( EVJDT**** E3UI4***** E*****0X1FHL E26R******* ******RIN9KGU) | |
for i in "${distributions[@]}" | |
do | |
aws cloudfront create-invalidation --distribution-id $i --paths "/*" --profile yourProfile | |
done | |
#Remember add permision for execute and use "./invalidate_distributions.sh" not "sh invalidate_distributions.sh" because sh doesn't support array |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment