This is a short and sweet tutorial on how you can clear cache and invalidated AWS CloudFront in 3 simple manual steps.
Invalidating objects removes them from the CloudFront edge cache. You can also invalidate single files with the aws-cli. This post will not got into this option but you can read more about invalidating via aws-cli in the AWS docs.
Please note that you can find more on pricing of submitting invalidation paths in the AWS Docs.
Right, let’s get started.
First you have to log into your AWS console and navigate to CloudFront service. This blog posts assumes you have your CloundFront Instance already connected to your S3 bucket which you want to invalidate.
Then select the CloudFront ID that is connected to the bucket, which you want to clear the cache from.
Navigate into the CloudFront instance and go to the `Invalidations` tab where you can ‘Create Invalidation’.
Click on ‘create navigation and in the `Object Path` box enter: /*
Then click on ‘Invalidate’ and the invalidation will run:
All Done! 👏Your cache should be cleared and you are good to go once the run completed.
Let me know what you think or if you have questions, hit me up on Twitter 👩💻 I enjoy reading/tweeting/retweeting all kinds of tech/coding content 🏄♀️