This file contains 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
<?php | |
/** | |
* Super-simple AWS CloudFront Invalidation Script | |
* | |
* Steps: | |
* 1. Set your AWS access_key in gitlab CI/CD | |
* 2. Set your AWS secret_key in gitlab CI/CD | |
* 3. Set your CloudFront DISTRIBUTION_ID in gitlab CI/CD | |
* 4. Define the batch of paths to invalidate | |
* 5. Run it on the command-line with: php invalidate-cloudfront.php $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY $DISTRIBUTION_ID |