Rate Limit Exceeded?


#1

We are running into this more and more on deployments…ugghhhh AWS and Cloudformation.

Anyone else experiencing this??? Any ideas to mitigate?

Your request has been throttled by EC2, please make sure you have enough API rate limit. EC2 Error Code: RequestLimitExceeded. EC2 Error Message: Request limit exceeded. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: ea231a7b-cc32-42fe-8584-e78751cbea85)


#2

Released a deploy stagger option https://github.com/tongueroo/jets/pull/364 It may help. Docs:

https://rubyonjets.com/docs/extras/deploy-stagger/

Wondering how many lambda functions your app creates. Thinking the rate limit error corresponds to the number of functions getting created.

Also wondering how often you run into the rate limit error. Been testing without staggering enabled and haven’t been able to trigger it yet. This is with a test app that has 200+ functions. :face_with_monocle:


#3

Sorry this project fell of my map for a little while…we aren’t near 200 functions, only around 60ish…the problem was only occurring when deploying to VPC…maybe the network connections being setup cause the issue??? Anyways, let me pull in the deploy stagger option and see if that mitigates…as always, thanks for the quick response.

I’ll update you with what I see.


#4

All good.

RE: VPC…maybe the network connections being setup cause the issue???

Oh interesting, that makes more sense now. With VPC the current lambdas are creating an ENI card for each lambda function. So the rate limit is reached much more quickly. The extra ec2 API calls to create the ENIs don’t happen in non-vpc.

Recently, AWS announced Lambda VPC speed improvements support. It should also help because only a few ENIs will be created instead of one for each function. Details:

Wondering if after the Lambda VPC speed improvements are fully rolled out, the rate limit issues you’re seeing will also go away. AWS says they are partially rolling it out already on some AWS accounts and will be eventually fully rolled out. No definite timeframe though.