CDK v2 failed publish assets to cdk-hnb659fds-assets-* bucket

0

Hello

We have migrated our AWS CDK from version 1 to ver 2. After first run new with new cdk it failed and asked to run cdk bootstrap. After run bootstrap, it switched to new version and after that it stopped upload/publish assets to S3 due to permissions issue. It failed with next error:

current credentials could not be used to assume 'arn:aws:iam::1234567890:role/cdk-hnb659fds-deploy-role-1234567890-ap-southeast-2', but are for the right account. Proceeding anyway.
[0%] start: Publishing b78d53a4e13604c990990d071559d16689ce158c2dfc2a01824190f31228a3bc:current_account-current_region
current credentials could not be used to assume 'arn:aws:iam:: 1234567890:role/cdk-hnb659fds-file-publishing-role-1234567890-ap-southeast-2', but are for the right account. Proceeding anyway.
[100%] fail: Bucket named 'cdk-hnb659fds-assets-1234567890-ap-southeast-2' exists, but not in account 1234567890. Wrong account?

I tried run bootstrap with different options: cdk bootstrap and with cdk bootstrap --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess but no luck.

Please help understood the problem and resolve it.

Thanks, Stanislav

  • Issue was fixed myself.

    Root-cause: By unknown reason the bootstrap process doesn't ask and create/attach IAM user from with we doing the deployment to new created cdk- roles. Official documentations doesn't told nothing about that.

    Fix: I added IAM users with assume role permission for allow them access to resources following this answer https://stackoverflow.com/a/68898448/2227931

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

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

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

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

관련 콘텐츠