How to manually invalidate AWS CloudFront

May 05, 2020 - aws cloudfront validation s3 cache - 1 min read

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.

Profile picture

Written by Christina Hastenrath
Software Engineer @Postman 👩‍🚀 Follow me on Twitter for more tech content 🙌

© 2021, Built with 💚 by Christina Hastenrath