Slow webpage update

0

I am updating an existing static website in S3. If I upload a page with a new name, the result shows up immediately in a browser. If I replace a page with the same name, that page doesn't show up in my browser for more than 24 hours. How can I fix this so that I can replace an existing page and have it be immediately available to browsers?

1 Answer
0
Accepted Answer

Hi There

Are you using CloudFront for your website with S3 as the origin? If so, the default cache TTL is 24 hours.

By default, CloudFront caches a response from Amazon S3 for 24 hours (Default TTL of 86,400 seconds). If your request lands at an edge location that served the Amazon S3 response within 24 hours, then CloudFront uses the cached response. This happens even if you updated the content in Amazon S3.

See https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-serving-outdated-content-s3/

profile pictureAWS
EXPERT
Matt-B
answered 2 years ago
profile pictureAWS
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions