What AWS role and policies are needed to assume a role with pulumi? #17462
-
|
I am trying to introduce a pulumi on a project where they currently deploy everything on heroku. I've used pulumi in the past with no issues. I get this error: Keep in mind the pulumi up works perfectly fine on my other AWS account where I have AdministratorAccess The admin added this policy for my user-that had no effect and I still get 403: I also posted this on reddit here: https://www.reddit.com/r/pulumi/comments/1fv3jcf/what_aws_role_an_policies_are_needed_to_assume/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Two thoughts:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PermissionToAssumeAlice",
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::XXXXXXXXX:role/pulumi" // role you want to assume
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::XXXXXXXXX:user/pulumi" // user assuming role
},
"Action": "sts:AssumeRole"
}
]
}(src: https://repost.aws/knowledge-center/iam-assume-role-error) |
Beta Was this translation helpful? Give feedback.
Two thoughts:
In your code
roleToAssumeARNis specifying a user. I assume you're already logged in asuser/pulumi; did you mean this to be the role your admin provided?You mention your admin added policy for
user/pulumi- did they also add policy to the role you want to assume?arn:aws:iam::XXXXXXXXX:user/pulumi:{ "Version": "2012-10-17", "Statement": [ { "Sid": "PermissionToAssumeAlice", "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::XXXXXXXXX:role/pulumi" // role you want to assume } ] }arn:aws:iam::XXXXXXXXX:role/pulumi{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal":…