我有这样的错误
Role arn:aws:iam::xxxxxx:role/cdk-xxxxxxxxp-northeast-1 is invalid or cannot be assumed
好的,所以我使用 AdministratorAccess
创建了该角色
名字相同
cdk-stagcdk-cfxxxxxxxxxxxx-northeast-1
但是发生同样的错误。
nnnn...我不知道还能做什么。
有人帮忙吗?
我的角色创建过程如下。
创建策略 -> AWS 账户 -> 添加 AdministratorAccess -> 然后设置相同的名称 cdk-stagcdk-cxxxxxx-ap-northeast-1
解决方案
角色
没有信任策略,
所以我像下面这样更改了信任策略。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "sts:AssumeRole",
"Condition": {}
}
]
}
感谢@Marcin
最佳答案
当您删除引导堆栈时会发生这种情况。只需使用 cdk bootstrap 重新引导环境,它将创建必要的角色。
关于amazon-web-services - 删除cloudformation时 ` is invalid or cannot be assumed`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71703664/