- Newest
- Most votes
- Most comments
The issue you're encountering is related to the rate at which AWS CodeBuild accepts incoming build requests. While you might not be exceeding the concurrent build limit, AWS CodeBuild imposes a limit on the number of build requests that can be made per second.
ThrottlingException errors typically occur when the number of requests exceeds the AWS CodeBuild API request rate limits.
AWS does not publicly disclose the exact rate limit, but it's important to know that it exists and is separate from the limit on concurrently running builds. This rate limit applies to the number of requests made to start builds, not the number of builds that are running.
To resolve this issue, you can implement a few strategies:
-
Retry logic: Implement retry logic in your webhook handler to handle throttling exceptions. After receiving a ThrottlingException, wait for a few seconds and then retry the request.
-
Queueing system: Use a queueing system like Amazon SQS to handle bursts of build requests. Your webhook handler can push messages to an SQS queue, and a separate worker can pull messages from the queue and start builds at a controlled rate.
-
Request limit increase: You can also contact AWS Support to request an increase in your API rate limit.
Remember, these strategies can be used in combination. For example, you could use an SQS queue to handle bursts of requests, and implement retry logic in your worker to handle any throttling exceptions that still occur.
I hope this helps!
Relevant content
- asked 3 months ago
- asked 8 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago