Codepipeline: Insufficient permissions Unable to access the artifact with Amazon S3 object key

后端 未结 2 1643
忘了有多久
忘了有多久 2020-12-16 13:01

Hello I created a codepipeline project with the following configuration:

  • Source Code in S3 pulled from Bitbucket.
  • Build with CodeBuild, generating an
2条回答
  •  死守一世寂寞
    2020-12-16 13:22

    I was able to find a solution. The true issue is that when the deployment provider is set as Amazon ECS, we need to generate an output artifact indicating the name of the task definition and the image uri, for example:

    post_build:
        commands:
          - printf '[{"name":"your.task.definition.name","imageUri":"%s"}]' $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG > imagedefinitions.json
    
    artifacts:
        files: imagedefinitions.json
    

提交回复
热议问题