How do I resolve the "Getting error Too Many Requests" error when I submit an AWS Batch job?
Last updated: 2021-04-29
My AWS Batch job failed, and I received a "Getting error Too Many Requests" error. How can I resolve this error?
When you reached your AWS Batch API limits, AWS Batch returns the following error message:
"Getting error Too Many Requests (Service: AWSBatch; Status Code: 429; Error Code: TooManyRequestsException)."
There are two common reasons Getting error Too Many Requests errors occur:
- Submitting multiple jobs at the same time programmatically, using the AWS Command Line Interface (CLI) or AWS SDKs
- Using AWS Lambda to submit multiple jobs.
Note: As you troubleshoot the error, consider the following:
- API limits don't apply to your account, but to AWS endpoints.
- AWS throttles all Amazon API requests for each AWS account on a per-Region basis. This prevents any one account from flooding the service endpoints with too many requests.
- AWS makes sure that all calls to all Amazon APIs don't exceed the maximum allowed API request rate. The maximum API request rate can vary across Regions.
Use retries and an exponential backoff algorithm with Jitter, and then resubmit your job
For more information, see Exponential backoff and Jitter.
Use AWS Batch array jobs to submit multiple jobs with a single SubmitJob API call
Note: AWS Batch array jobs allows you to submit up to 10,000 copies of a job.