question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aws-s3-deployment - intermittent cloudfront "Waiter InvalidationCompleted failed" error

See original GitHub issue

https://github.com/aws/aws-cdk/blob/beb01b549abc5a5c825e951649786589d2150a72/packages/%40aws-cdk/aws-s3-deployment/lib/lambda/index.py#L150-L163

I’ve come across a deployment where cloudfront was invalidated but the lambda timed out with cfn_error: Waiter InvalidationCompleted failed: Max attempts exceeded. ~I suspect a race conditon, and that reversing the order of cloudfront.create_invalidation() and cloudfront.get_waiter() would fix this race condition.~

edit: proposed fix of reversing create_invalidation() and get_waiter() is invalid, see https://github.com/aws/aws-cdk/issues/15891#issuecomment-898413309

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:34 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
benjaminpottiercommented, Sep 30, 2022

Is it possible to re-open this issue? We’re experiencing this problem as well.

4reactions
otaviomacedocommented, Nov 11, 2021

From the CloudFront team:

CreateInvalidation API suffers from high fault rate during the daily traffic peaks. It will return faults upto 50% of the requests. It is primarily due to the limited capacity of the API.

and

We have evidence that some requests failed even after six retries , during the peak. We are working on improving this , but there is no quick fix for this and we are expecting it will get better by the end of Q1 2022.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class: Aws::CloudFront::Waiters::InvalidationCompleted
Returns a response object which responds to the following methods:. Constructor Details. #initialize(options) ⇒ InvalidationCompleted. Returns a new ...
Read more >
invalidation-completed — AWS CLI 2.9.6 Command Reference
Wait until an invalidation has completed. It will poll every 20 seconds until a successful state has been reached. This will exit with...
Read more >
AWS Cloudfront error? invalidation max times while ...
The error still happens randomly, sometimes just retrying the deployment later works fine, and others fail on a different distribution.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found