2 Answers
- Newest
- Most votes
- Most comments
1
Fixed it by creating another KMS key in another region. Then by using Launch Configuration use this KMS key. Role is not needed.
answered 2 years ago
1
So your source account is 111 and target 222
The Assume Role in Target 222 does not not look in correct. You need to allow 111 in the trust not 222 because your allowing account 111 to assume this role, so we "Trust" that account.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111:root"
},
"Action": "sts:AssumeRole",
"Condition": {}
}
]
}
Also the role in account 222 needs to have the policy Ec2ImageBuilderCrossAccountDistributionAccess attached to the role.
Relevant content
- asked 2 years ago
- asked 3 months ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
Yes, I tried, but still I got the same error. I used those steps for account 222:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "imagebuilder.amazonaws.com", "AWS": "arn:aws:iam::111:root" }, "Action": "sts:AssumeRole", "Condition": {} } ] }
Did you attach the policy?
Yes, policy is attached. I think that the problem could be that I need multi region KMS key, as this second account is in different region.
I don’t think you can have a service and AWS principal in the same statement.