Mostafa
Mostafa

Reputation: 1551

Speed up static website update on AWS S3 and Cloudfront

I have a static website hosted on AWS S3 and Cloudfront. The first time I upload a new page, the page is available instantaneously. Then if I modify the file, changes to the website are delayed by around 24 hours.

How can I speed up this update?

Upvotes: 1

Views: 2100

Answers (1)

HEEWON
HEEWON

Reputation: 21

Your situation is using S3 Static website hosting. We believe you are using CloudFront to speed up S3.

By default, when you create a CloudFront deployment, the default TTL is one day.
If the TTL value remains, the file will not be updated.

If your files are frequently updated, we recommend modifying the TTL.

Modifying TTL Images

We will send you a link to TTL. http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html

If the file is not updated frequently, but you want to update it occasionally, you can use a feature called Invalidation.
Invalidation is a function that removes the remaining TTL value.

/images/image1.jpg
/images/image*
/images/*

You can use it in these ways.

If you have any questions, please feel free to reply!
Thank you.

Upvotes: 1

Related Questions