How do I resolve unexpected CodeBuild AccountLimitExceededException error?

0

I have a CodeBuild project that was created by AWS Control Tower Account Factory for Terraform.

Every time I tried to "Start build" in the console, it spits out following error:

Build failed to Start. The following error occurred: Cannot have more than 0 builds in queue for the account

Log events from CloudWatch:

[ERROR] 2022-02-27T01:01:56.498Z 5aaae098-f77f-457d-8ff8-ee202b27c308 {'FILE': 'codebuild_invoker.py', 'METHOD': 'lambda_handler', 'EXCEPTION': 'An error occurred (AccountLimitExceededException) when calling the StartBuild operation: Cannot have more than 0 builds in queue for the account'} Traceback (most recent call last): File "/var/task/codebuild_invoker.py", line 30, in lambda_handler job_id = client.start_build(projectName=codebuild_project_name)["build"]["id"] File "/var/runtime/botocore/client.py", line 386, in _api_call return self._make_api_call(operation_name, kwargs) File "/var/runtime/botocore/client.py", line 705, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.AccountLimitExceededException: An error occurred (AccountLimitExceededException) when calling the StartBuild operation: Cannot have more than 0 builds in queue for the account

[ERROR] 2022-02-27T01:01:56.498Z 5aaae098-f77f-457d-8ff8-ee202b27c308 {'FILE': 'codebuild_invoker.py', 'METHOD': 'lambda_handler', 'EXCEPTION': 'An error occurred (AccountLimitExceededException) when calling the StartBuild operation: Cannot have more than 0 builds in queue for the account'} Traceback (most recent call last): File "/var/task/codebuild_invoker.py", line 30, in lambda_handler job_id = client.start_build(projectName=codebuild_project_name)["build"]["id"] File "/var/runtime/botocore/client.py", line 386, in _api_call return self._make_api_call(operation_name, kwargs) File "/var/runtime/botocore/client.py", line 705, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.AccountLimitExceededException: An error occurred (AccountLimitExceededException) when calling the StartBuild operation: Cannot have more than 0 builds in queue for the account

Any pointer to solve the error?

질문됨 2년 전1818회 조회
4개 답변
1

Update:

I tried CodeBuild StartBuild from an account that was not managed by Control Tower and it works as expected.

So I'm assuming that this is caused by some configuration in the Control Tower managed account. Checked the SCP and GuardRails but does not look like there is any related restriction to CodeBuild nor the services that it uses (IAM, CloudWatch).

답변함 2년 전
1

There are various account level quotas that AWS sets for new and existing accounts. Some of the quotas protect you from unpredicted cost skyrocketing when you just start the cloud journey, the other ones might be applied if AWS detects something unusual in your accounts (e.g. an open vulnerability, an expired credit card, ...)

The best way to resolve this issue is contacting AWS Support and requesting the quota increase for the number of concurrent builds in AWS CodeBuild in that account. If there are some things than need to be fixed in your account first, you will be informed about that. Otherwise, the quota will be increased, so you can run your builds in AWS CodeBuild.

profile pictureAWS
답변함 2년 전
0

Submitting an AWS Support ticket for Service Limit Increase of CodeBuild Maximum Number of Concurrent Builds fixed this for me. It is odd though that the default AWS value in ServiceQuota for "Concurrently running builds" is 60, but we still need to ask AWS support for service increase.

Neal
답변함 일 년 전
0

I faced this problem recently and after researching a lot on google I ended up raising a support ticket to increase me build quota. After increase, I was able to build and this error was not coming any more.

On side note, in case anyone face this error and they still want to try and test buildspec.yml, it is possible to do that in the local environment using CodeBuild agent. Here is the full documentation for this - https://docs.aws.amazon.com/codebuild/latest/userguide/use-codebuild-agent.html

답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠