Errors on using CodeBuild for first time

别来无恙 提交于 2020-01-25 05:16:05

问题


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

回答1:


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.




回答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.




回答3:


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




回答4:


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!



来源:https://stackoverflow.com/questions/54063206/errors-on-using-codebuild-for-first-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!