Changing static content on S3 bucket to domain

239 Views Asked by At

I have hosted a static website on AWS S3 using Route53, CloudFront, and ACM. The problem right now is that I needed to make some content changes to the website. Once I did that, I changed the content in the S3 bucket and the website changed for the S3 hosted one: http://flus.ae.s3-website.ap-south-1.amazonaws.com/

But, the same changes are not reflecting on the website hosted with Route53, CloudFront, and ACM. Can someone please help me and tell how to make the changes reflect on the real website https://flus.ae as well?

Thanks

1

There are 1 best solutions below

0
piyush sachdeva On

This is probably because Cloudfront caches the content for 24 hours by default hence, your changes will be reflected only after 24 hours. if you want to clear the cache, you can do so by going to CloudFront --> distribution --> invalidation and then enter the file names that you have changes e.g /index.html (make sure you add / for the root location), and then run the invalidation once, it is completed you should be able to see the changes.

If you are looking for a better way to host your website with S3 and Cloudfront without the pain of using Lambda function, I have created a step by step tutorial for that very purpose, please have a look at https://www.youtube.com/watch?v=94DyGswSY6k&t=1475s