Home > Software design >  when deleting cluodformation ` is invalid or cannot be assumed`
when deleting cluodformation ` is invalid or cannot be assumed`

Time:04-01

I have error like this

Role arn:aws:iam::xxxxxx:role/cdk-xxxxxxxxp-northeast-1 is invalid or cannot be assumed

OK, so I made the role with AdministratorAccess

and same name

cdk-stagcdk-cfxxxxxxxxxxxx-northeast-1

However same error happens.

nnnn... I have no clue to do anything more.

Does anyone help?

My procedure to make role is here below.

create policy -> AWS account -> add AdministratorAccess -> then set the same name cdk-stagcdk-cxxxxxx-ap-northeast-1

Solution

role don't have trust policy,

So I changed the trust policy like this below.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "sts:AssumeRole",
            "Condition": {}
        }
    ]
}

thanks to @Marcin

CodePudding user response:

This happens when you delete the bootstrap stack. Simply re-bootstrap the environment with cdk bootstrap and it will create the necessary roles.

  • Related