(pipelines): could not assume role in another account #19686
Labels
@aws-cdk/pipelines
CDK Pipelines library
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
I have a dedicated AWS account for running pipeline (let's call it
account-1
) and another AWS account where all resources being deployed by pipeline (account-2
).Everything worked just perfectly till today: I added a new stack to be deployed to
account-2
and pushed changes to remote git repo.Expected Behavior
A new stack is deployed successfully to
account-2
via CodePipeline. No errors in pipeline shown.Current Behavior
The
Build
step of CodePipeline started failing with the following error:Reproduction Steps
Possible Solution
I went to
arn:aws:sts::account-1:assumed-role/PipelineStack-AppNamePipelineBuil-XXXXXXX
role and edited it manually by addingAssumeRole
onarn:aws:iam::account-2:role/cdk-xxxx-lookup-role-account-2-us-west-2
. After that pipeline has completed successfully.Although I don't feel like I should have done manual update of the role. All the necessary permissions should be granted automatically when running
cdk bootstrap
Additional Information/Context
I tried re-running
cdk bootstrap
(although I did this already when initially deploying the pipeline):But it didn't help.
CDK CLI Version
2.18.0
Framework Version
No response
Node.js Version
17.7.1
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: