How to clear cache for website in AWS s3 + Cloudfront + Route53 + Certificate Manager free tier
1 min readJun 1, 2022
How to clear cache for website in AWS s3 + Cloudfront + Route53 + Certificate Manager
I have my own personal site which is a static website hosted in AWS S3 with Route53 for my DNS + Cloudfront as my CDN (content delivery network) cache.
Issue is that when I updated my website and i go to the domain…. malfunction.domain.com, its still showing my old content.
To resolve this, you need to clear the cache in your Cloudfront address which would look like https://e23hxz5y9mm9vecloudfront.net/ by creating an invalidation entry in Cloudfront.
To do this follow the steps below.
- Open your CloudFront Distributions list, and click the desired distribution ID you want to clear it’s cache.
- Click ‘Invalidations’ tab
- Click ‘Create invalidation’ button
- Insert /* in the object paths input in order to clear cache of all files.
- Click ‘Create invalidation’ button.
After the invalidation has been created. You should see your updated website.