-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Cloudfront Invalidation rate limit issues #3983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @dipakjain94 thanks for reaching out. Can you send a reproducible code that we can use to investigate this more? |
Hi @vudh1 Below are the lambda handler code which is triggered on S3 events (s3:ObjectCreated:, s3:ObjectRemoved:). |
@vudh1 At your convenience would you mind giving us a brief update regarding this issue? |
Do we have anything as an update or can change the user who has help us on this. |
Hi @vudh1, Do we have any update on this issue? |
This issue still persists, could you please have a look? |
Hi there. Same problem here. I Tried to use a throttling method to deal with maximum rate at a given time but does not work. |
Hi all, we are having the same problem too. On a staging environment, when nothing else is happening, we can randomly get a "Rate exceeded" error on the first invalidation request. |
@awstools @AllanZhengYP @kuhe @jrencz @kellertk @comcalvi @eduardomourar We would really appreciate a comment on this issue and escalating this internally, because it affects a large number of AWS users. |
BrieflyI tend to think it's rather an CloudFront API issue than JS SDK issue. Or that there's some coincidence of those requests being sent interlaced with some other and that's why it hits throttling (but that's a pure speculation) @dipakjain94 have you tried passing In detailIf there were too many paths to invalidate it should respond with It seems as if it was about endpoint being called too frequently. The error is In the code sample we see that service has been instantiated with no options, so Lines 31 to 34 in b0fd315
So since it's not set on Lines 169 to 172 in b0fd315
From what I see in the issue I can't tell if there were retries or not in reported case and I haven't searched for test confirming it works but if it didn't then I guess it would have already been noticed. |
@jrencz thank you for the feedback! I don't believe we are hitting CloudFront limits because we receive this error when hitting no more than 15 single file invalidation requests in a row. How can the maxRetries option be set? |
Hi @jrencz This issue is still not solved. Is there any way or place where we could escalate it? |
Hey Guys apologies this issue fell out of queue and went unseen. With that being said I can take it up, Reading at the docs for rate limits/quotas, I dont feel the number you mention come near that but not certain https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-invalidations The rate limit exceeded error indicates that the API calls to CloudFront have exceeded the max limit. The error and the stack trace doesnt indicate the error to be an SDK error. To verify we can log all the calls made by Lambda and go from there. Retires can be logged by using logger :
Have also reached out to the cloudfront team to have more insight. |
Found this while searching for an issue at work... best I can put together from the AWS case we have open, there are actually "burst limits" (that's actually the search term that led me here!). We were sending in no more than 70 Invalidations in an hour, but 10 (or so) of them were being requested in a single second. This seems to have triggered a "Rate exceeded" error. Best I can tell, the solutions are:
|
FYI:
|
Hello everybody. Some internal AWS information was posted to this issue; I have removed this information for now. The comments from @LYTzeng are correct and you should follow this guidance in the future. |
Hello @LYTzeng and @kellertk , |
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the question
We have an application that is using S3 and cloudfront. we have define a process which will create or replace new object/files in S3 bucket which will consume in our mobile app with cloudfront URL.
Process -
Once we get a file in S3 bucket, we triggered lambda function that execute invalidation for specific S3 object (without using * wildcard character).
Problem -
we are getting Throttling: Rate exceeded exception for invalidation request. we observe that first 6-7 request executed successfully then we receive this error.
According to AWS documentation - we can have invalidation requests for up to 3,000 files per distribution in progress at one time. but we are receiving error after 6-7 request.
SDK version number
v2.981.0
The text was updated successfully, but these errors were encountered: