Search code examples
amazon-s3amazon-cloudfront

AWS s3 still rendering old html file despite the bucket being empty


I've got a weird one!

My s3 bucket is set up for static website hosting. It previously contained a single index.html. That file has since been deleted, the bucket in now empty. Despite this, the old page is still showing up when I go to the URL.

I have it all set up so that I can use my own URL (via route 53) and it is distributed via cloudfront.

The URL is https://blockchainit.cloud

proof that the bucket is empty!

enter image description here

Any ideas???


Solution

  • The https in your vanity URL indicates that S3 can't be the only service involved, because S3 website hosting does not natively support HTTPS. A check of the HTTP response headers should reveal X-Cache: Hit from CloudFront. You are seeing this because the page is in the CloudFront cache.

    Disable the CloudFront distribution if you want to take the site completely offline, or submit an Invalidation Request for / to clear the CloudFront cache for the main page or /* for all files.