How to avoid rate limiting in CodePipeline / CodeBuild

0

I have a CodePipeline that has 1 Source Stage with 1 Source Action, then 1 Build Stage with 3 Build Actions.

The 3 Build Actions are all run as batch executions and each one spins up about 50 instances. When I run this, 1/3 Build Actions fails with:

BATCH_START_BUILD_ERROR: Failed calling StartBuild for a batch.. Failed while calling StartBuild for buildType BATCH_BUILD with exception message: Rate exceeded (Service: AWSCodeBuild; Status Code: 400; Error Code: ThrottlingException; Request ID: <GUID>; Proxy: null)

In other words, CodeBuild is grumpy that I'm trying to simultaneously spawn 150ish instances.

What is the best way to avoid this? I know I could add a Stage and run the 3 Build Actions in 3 different Stages, but that would slow down the overall pipeline. Is there any way for me to request a limit increase for this or is there an alternative solution that would allow me to run this in parallel?

  • Hi, have you tried requesting a quota increase for "Concurrently running builds for <type>/<size>". You can have a look at the default quotas and steps to request increases through the User Guide.

  • Hi @Gary_S - Good suggestion, but I am already allocated double the number of builds I need in that category (300). This seems to be an API rate limiter in the internal request from CodeBuild to spin up an instance.

asked 9 months ago52 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions