Codepipeline deployed by CDK fails on the first run

0

Hi, I am writing CodeCommit and CodePipeline project with CDK.

But I am facing an issue: When the pipeline is created for the first time, it starts automatically and always fails at the build stage with an error. If I restart the pipeline from the Management Console, it runs without any errors.

  • First run -> fail at the build stage
  • Restart pipepine manually -> build success

The error message is

Error calling startBuild: User: arn:aws:sts::111111111111:assumed-role/blabla-XXXXXXX/nnnnnn is not authorized to perform: codebuild:StartBuild on resource: arn:aws:codebuild:ap-northeast-1:111111111111:project/SampleBuildProject because no identity-based policy allows the codebuild:StartBuild action (Service: AWSCodeBuild; Status Code: 400; Error Code: AccessDeniedException; Request ID: xxx; Proxy: null)

I confirmed that the role had 'startBuild' action.

I think it happens because the pipeline deployment is still running when the first build runs.

Is there any solution to avoid this?

Thanks!

yk
질문됨 2년 전59회 조회
답변 없음

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

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

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

관련 콘텐츠