Old S3 Content Being Served, Help!

0

A month ago, I decided to implement a cloudfront dirstribution for a static web hosting s3 bucket when setting up a CI/CD pipeline with Buddy. My domain is managed by route 53. When changing this, I made sure to change my A and AAAA records for my site, eckmantek.com, from their default to my distribution, which is d22tb0q1u7k32l.cloudfront.net. With this set up, I began using my pipeline, but when I now navigate to my domain, my old content is still being served. I dug around in icann and found different name servers for my domain than my distro, so maybe this is related?

I am still quite new, so apologies for the basicness of this question!

2 回答
3

Hello, It appears that the objects in the cloudfront cache are not updating. There are two ways to clear the Cloudfront cache:

1- Work with a TTL (Timet to live) to decide how long an object will stay in the cloudfront cache until it expires and requires S3 the latest version of the object to be served. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html (See: Specifying the amount of time that CloudFront caches objects)

2- Directly invalidate the files in a specific path so that in the next request Cloudfront obtains the latest version of the file to S3. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html

I hope I have helped you and that you can solve the problem.

profile picture
专家
已回答 2 年前
AWS
专家
Hernito
已审核 2 年前
0

I notice that different content is being served depending on whether you use the custom domain name, or the cloudfront domain name. This would indicate that you may not have associated the custom domain name with the correct/intended distribution in CloudFront, despite having updated DNS.

The following article may help you if you need to migrate the custom domain name between distributions and/or accounts: https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-migrate-account/

AWS
专家
Paul_L
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则