A developer is troubleshooting a multi-account deployment pipeline in AWS CodePipeline. During the execution, the AWS CodeBuild stage fails with an AccessDenied error when attempting to assume a deployment role in a target AWS account. Additionally, a separate AWS CloudFormation deploy stage fails with an error indicating that the target stack is in the ROLLBACK_COMPLETE state from a previous failed creation. Which two actions must the developer take to resolve these failures? (Select TWO.)
- Delete the CloudFormation stack in the ROLLBACK_COMPLETE state before running the deployment pipeline again.Answer
- Update the trust policy of the target deployment role to allow the AssumeRole action from the CodeBuild service role principal.Answer
- CExecute the continue-update-rollback command using the AWS CLI to transition the CloudFormation stack out of the ROLLBACK_COMPLETE state.
- DUpdate the pipeline's CloudFormation deployment stage configuration to disable rollback on resource creation failure.
- EAdd the target deployment role's ARN to the trust policy of the CodeBuild service role in the source account.
Answer
Delete the CloudFormation stack in the ROLLBACK_COMPLETE state before running the deployment pipeline again, and update the trust policy of the target deployment role to allow the AssumeRole action from the CodeBuild service role principal.
To resolve the deployment issues, the developer must delete the stack in the ROLLBACK_COMPLETE state because CloudFormation does not support updating a stack that failed during its initial creation. Additionally, to resolve the cross-account AccessDenied error, the developer must update the trust policy of the target role to trust the CodeBuild service role as a principal, permitting the sts:AssumeRole action.
Step-by-Step Solution
Key Concept
Cross-account IAM delegation and CloudFormation initial creation rollback handling