Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Cloudfront distribution staying "in Progress" for 55 minutes and counting

I updated S3 objects and then update Distribution (caching related) settings. That was 56 minutes ago. The updated distribution is still In Progress.

The total size of S3 objects is 21Mb. How come it is taking so long? And on AWS forrum there were complaints regarding this in 2016. Hard to believe this does not bother AWS leadership.

like image 362
Dustin Sun Avatar asked May 03 '19 21:05

Dustin Sun


2 Answers

CloudFront is notoriously slow at reporting that changes to a distribution's configuration are fully deployed... but testing typically reveals that the new behavior is in place long before the state change occurs.

CloudFront doesn't pre-load your content from S3, so the time is completely unrelated to the total size of the objects -- all that is happening in the "In Progress" state is that the configuration (origins, cache behaviors, etc.) is replicating globally to all of the 100+ edge locations. An ususually long delay only implies that it hasn't fully finished propagating the configuration, for whatever internal reason.

like image 157
Michael - sqlbot Avatar answered Oct 17 '22 10:10

Michael - sqlbot


I have managed to speed it up by invalidating the cache, which does the changes usually immediately for me.

  1. Choose CloudFront Distribution
  2. Click the Invalidations tab
  3. Click on Create Invalidation button
  4. Add * into Object Paths and click on Invalidate
like image 44
Black Avatar answered Oct 17 '22 10:10

Black