How to clear cache for website in AWS s3 + Cloudfront + Route53 + Certificate Manager free tier

malfunction-grinds
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.

  1. Open your CloudFront Distributions list, and click the desired distribution ID you want to clear it’s cache.
  2. Click ‘Invalidations’ tab
  3. Click ‘Create invalidation’ button
  4. Insert /* in the object paths input in order to clear cache of all files.
  5. Click ‘Create invalidation’ button.

After the invalidation has been created. You should see your updated website.

--

--