A developer is configuring a continuous delivery pipeline in AWS CodePipeline. During the pipeline execution, the pipeline fails at the transition to a deployment stage with an access denied error indicating that the pipeline cannot assume the service role. Which of the following is the most likely cause of this failure?
- The IAM service role assigned to the pipeline has a trust policy that does not list codepipeline.amazonaws.com as a trusted entity.Cevap
- BThe IAM service role lists codepipeline.amazonaws.com in the identity-based permissions policy rather than in the trust policy.
- CThe pipeline is attempting to retrieve a database connection string from Systems Manager Parameter Store, which fails because Parameter Store cannot rotate credentials.
- DThe pipeline is unable to parse the build configuration because the buildspec.yml file is placed in a subdirectory of the source repository rather than the root directory.
Cevap
The IAM service role assigned to the pipeline must have a trust policy that explicitly lists codepipeline.amazonaws.com as a trusted entity.
The correct option is correct because AWS CodePipeline requires an IAM service role to execute pipeline actions on your behalf. The service role's trust policy must declare codepipeline.amazonaws.com as a trusted entity so that the pipeline service can assume the role and obtain temporary credentials.
Adım Adım Çözüm
Anahtar Kavram
AWS CodePipeline Service Roles and IAM Trust Policies