Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

Is there any way to update files stored on Amazon CloudFront (Amazon's CDN service)? Seems like it won't take any update of a file we make (e.g. removing the file and storing the new one with the same file name as before). Do I have to explicitly trigger an update process to remove the files from the edge servers to get the new file contents published?

1 Answer

0 votes
by (44.4k points)

Invalidation feature added by AWS

Sample Request from the API Reference:

POST /2010-08-01/distribution/[distribution ID]/invalidation HTTP/1.0

Host: cloudfront.amazonaws.com

Authorization: [AWS authentication string]

Content-Type: text/xml

<InvalidationBatch>

   <Path>/image1.jpg</Path>

   <Path>/image2.jpg</Path>

   <Path>/videos/movie.flv</Path>

   <CallerReference>my-batch</CallerReference>

</InvalidationBatch>

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...