Cloudfront serving a different version of content from an S3 bucket

0

Hello, we updated some files related to a website in an s3 bucket such as index.html for example, the intention would be to update a tag on a social network, I noticed that through the url of the bucket itself the value was updated, however When accessing via the DNS configured on a Route53, I'm not getting the same result. I've already tried to invalidate the cache for CloudFront but I wasn't very successful.

I noticed that the other html files that I updated also had the same behavior, when accessing the s3 url I have the new version, otherwise I have a different version.

Carlos
feita há um mês150 visualizações
2 Respostas
1

Hi,

Go to your CloudFront distribution in the AWS Management Console. Navigate to the "Invalidations" tab and create a new invalidation for the files you've updated (e.g., /index.html). This tells CloudFront to fetch fresh copies from the S3 bucket. After invalidating, wait for a few minutes for the changes to take effect. Sometimes it can take a bit of time for CloudFront to clear its cache. Make sure your S3 bucket is sending appropriate Cache-Control headers. You can set them to no-cache to ensure CloudFront always fetches the latest version. Check if the updated files are accessible directly from the S3 bucket URL. If they are, then the issue is likely with CloudFront caching.

please look at this link https://repost.aws/knowledge-center/cloudfront-serving-outdated-content-s3.

respondido há um mês
profile pictureAWS
ESPECIALISTA
avaliado há um mês
0

Hi

As I understand that you already invalidate the cache,

Even though you invalidated the cache, it might take some time (around 5 minutes) for the invalidation to propagate across all CloudFront edge locations.

Here is the link https://repost.aws/knowledge-center/cloudfront-serving-outdated-content-s3 to give you clear information about the solution

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/UpdatingExistingObjects.html#ReplacingObjects

How best to serve versioned S3 files from CloudFront

profile picture
ESPECIALISTA
GK
respondido há um mês
profile pictureAWS
ESPECIALISTA
avaliado há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas