amazon-web-services - 删除cloudformation时 ` is invalid or cannot be assumed`

标签 amazon-web-services aws-cloudformation

我有这样的错误

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/

相关文章:

amazon-web-services - Amazon CloudSearch : Is it possible to write a query that returns. ..一切?

sockets - 如何配置 EC2 安全组以允许通过公共(public) IP 地址进行环回?

amazon-web-services - AWS SES - Nodemailer - Transporter.sendEmail 不是函数

amazon-web-services - AWS Cloudformation 模板 - S3 存储桶策略 - MalformedPolicy 错误

aws-cloudformation - 无服务器部署问题

amazon-web-services - 如何将 Terraform 状态与我的 AWS 基础设施同步

javascript - 如何解决 AWS 错误 : "The difference between the request time and the current time is too large" front-end only?

java - AWS Java API for Spot 自动出价最高价格和分配策略

amazon-web-services - 云形成 : Create VPC Endpoint in the VPC in which a lambda is running

aws-lambda - 如何在 Cloudformation 脚本执行期间将 Cognito UserPoolID、客户端 key 传递给 AWS Lambda?