Errors on using CodeBuild for first time
Asked Answered
F

6

7

When starting a code build as part of a simple code pipeline, I get the following error within a few seconds.

Action execution failed
Error calling startBuild: Cannot have more than 0 builds in queue for the account (Service: AWSCodeBuild; Status Code: 400; Error Code: AccountLimitExceededException; Request ID: 80bfxxxxx

I have used the AWS Code pipeline wizard to create a simple build and deploy process, so I assume a misconfiguration did this.

My question is what is the queue it refers to? I am running this build in isolation of any other AWS task?

For information this is my buildspec.yml, though I suspect the build fails before accessing it:

version: 0.2

env:

phases:
  install:
    commands:
      - echo Entered the install phase...
      - apt-get update -y
      - apt-get install -y maven
    finally:
      - echo This always runs even if the update or install command fails 
  pre_build:
    commands:
      - echo Entered the pre_build phase...
      - cd server/harvest
    finally:
      - echo This always runs even if the login command fails 
  build:
    commands:
      - echo Entered the build phase...
      - echo Build started on `date`
      - mvn package
    finally:
      - echo This always runs even if the install command fails
  post_build:
    commands:
      - echo Entered the post_build phase...
      - echo Build completed on `date`
artifacts:
  files:
    - target/harvest-1.0-SNAPSHOT.jar
  discard-paths: yes
Fessler answered 6/1, 2019 at 15:49 Comment(1)
I have the same problem.Speculation
C
7

Sounds like an account issue. This error typically means that the account you are using is not active (at least not for CodeBuild subscription), hence not allowed to start any builds in CodeBuild. Please contact AWS support to activate your account.

Cancan answered 7/1, 2019 at 1:15 Comment(2)
AWS told me this error was not due to Code Build configuration but a fault in my account setup, once fixed Code Build started to workFessler
What was the fault? Can you tell us here how did you solved that ? @FesslerAikoail
C
2

It appears that your account limit is currently set to 0 for some reason. In order to increase this limit, and be able to use codebuild, you will need to contact AWS support.

Crupper answered 7/1, 2019 at 1:50 Comment(1)
It's strange but this worked for me. The default account limit is 60 and you have to request higher than that. I requested a raise to 61, they set it to 60 and then CodeBuild started working.Attainture
M
2

I've seen a lot of answers around the web suggesting to call support, which is a great idea, but I was actually able to get around this on my own.

As the root user I went in and put a current credit card. The one that was currently there was expired. I then deleted my CodeBuild project and rebuilt it. Now my builds work! I'm pretty sure AWS just needed a valid payment method before it allowed me to use premium services.

My solution may not work for you, but sure I hope it does!

Maliamalice answered 20/11, 2019 at 3:2 Comment(0)
T
0

if you are working in a new empty account, launch a ec2 instance (one hour aprox) and test ... Its work for me original reference

Timmerman answered 15/6, 2023 at 22:21 Comment(0)
P
0

This happened to me after a had manually aborted a couple pipelines. I had to wait a several minutes then I could start pipelines again.

I used the "stop and abandon" mode which shows a warning "This option can lead to failed actions." So maybe it takes a while to actually abandon the build or AWS is placing a timer on anyone that stops a build - from starting a new one.

Printery answered 12/6 at 17:49 Comment(0)
K
-1

Check the Region. Your account would not have setup for codebuild in current region.

Kneepad answered 11/3, 2019 at 14:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.