AWS Lambda Rate Exceeded error with low invocations
You hit the Lambda concurrency limit even with few calls. It's the AWS API throttle, not your function code. Fix it with backoff retries or increase the rate limit.
Quick answer
Add exponential backoff retries to your Lambda invocations. That's the fix 9 times out of 10. The error is from the AWS API rate limit, not your function's concurrency.
Why this happens
This one trips up a lot of people. You see a few dozen invocations per second, nowhere near the 1,000 concurrent execution limit. Yet bam, Rate exceeded (HTTP 429). Feels wrong, right? The culprit here is almost always the AWS API throttle, not Lambda's concurrency ceiling. Lambda uses multiple API endpoints under the hood — Invoke, GetFunctionConfiguration, even CloudWatch Logs calls. Each of these has its own burst limit. For the Invoke API, the default is 10 requests per second per account per Region. Yes, ten. That's for synchronous invocations. Async invocations have separate limits, but they're still tight. So when you call Lambda via the SDK, CLI, or an API Gateway, you burn through that 10 req/s cap fast. A burst of 11 calls in a second? That's your error. This is not about your function code. It's about how many API calls you make to start those functions.
Another common trigger: using the AWS Console to test Lambda. Each test click fires multiple API calls (Invoke, GetFunctionConfiguration, GetFunctionCodeSigningConfig, etc). Two clicks in one second? You're throttled. Same goes for CloudFormation stacks that create or update Lambda functions — those call DescribeFunction, UpdateFunctionCode, PublishVersion in parallel.
Fix steps
- Check the error timing — Look at CloudWatch logs or the error timestamp. If it's within the same second as other invocations, it's the API throttle. If it's across seconds, might be something else.
- Add retry with exponential backoff — The real fix. Every AWS SDK (boto3, JS, .NET) does this by default for service calls. But if you're using raw HTTP or a custom client, you're not getting it. Here's how in Python with boto3:
Theimport boto3, time from botocore.config import Config config = Config(retries={'max_attempts': 10, 'mode': 'adaptive'}) lambda_client = boto3.client('lambda', config=config) response = lambda_client.invoke( FunctionName='my-function', InvocationType='RequestResponse', Payload=b'{}' )adaptivemode uses exponential backoff plus jitter. Don't usestandard— it's slower and less effective under real burst. - If you can't use SDK retries — You're writing raw HTTP? Add your own backoff. Sleep 0.1 seconds, then 0.2, 0.4, up to 5 seconds. Stop at 5 retries. Don't go infinite.
- Check your invocation pattern — Are you calling Lambda in a loop? Batch them. Use SQS or EventBridge to queue invocations. 10 calls per second is a hard limit for sync invocations. Async invocations (InvocationType='Event') have a separate limit of 100 per second — still low.
- Request a rate limit increase — Open a support ticket with AWS. Tell them you need a higher
InvokeAPI rate limit for Lambda. They'll ask why. Say you have a burst workload (e.g., 50 invocations in a second during peak). They usually approve it within 24 hours. The default limit is 10 req/s, but you can get 100 or more. No cost.
Alternative fixes if the main one fails
- Reduce cold starts — No, this doesn't directly fix Rate Exceeded. But if your function takes 5 seconds to start, you might be piling up invocations waiting. Use Provisioned Concurrency to keep warm instances. Less concurrent invocations waiting = fewer API calls in a burst.
- Use Reserved Concurrency — This doesn't raise the API rate limit, but it prevents your function from consuming all your account's concurrency. If you have other functions starving, they'll also compete for API calls. Set a reserved concurrency of 10 for each function. Stops the cascading throttling.
- Check for other services calling Lambda — API Gateway, S3 events, SNS, CloudWatch Logs — they all invoke Lambda. If S3 fires 20 events per second, that's 20 invocations. Each one eats an API call. Use event filtering on S3 (suffix/prefix) or batch SQS messages before invoking.
Prevention tip
Stop testing Lambda functions from the Console or CLI in bursts. Use a staging environment with a tiny rate limit (like 2 req/s) to catch throttling early. Also, set up a CloudWatch alarm on the Throttles metric for your function — alarm at any value >0. That's a free early warning. And if you know you'll have spikes, request the rate limit increase before you need it. AWS support is slow on weekends.
One more thing: the Rate exceeded error also shows up when you call the AWS API to list functions or update their code. That's a different limit (GetFunction API). Keep them separate. If you're doing CI/CD and pushing code 50 times in a minute, you'll hit that limit too. Space out your deployments by 1-2 seconds each.
Was this solution helpful?