A solutions architect is creating an AWS CloudFormation template from an existing manually created non-production AWS environment The CloudFormation template can be destroyed and recreated as needed The environment contains an Amazon EC2 instance The EC2 instance has an instance profile that the EC2 instance uses to assume a role in a parent account
The solutions architect recreates the role in a CloudFormation template and uses the same role name When the CloudFormation template is launched in the child account, the EC2 instance can no longer assume the role in the parent account because of insufficient permissions
What should the solutions architect do to resolve this issue?
Edit the Trust Policy:
Go to the IAM console in the parent account and locate the role that the EC2 instance needs to assume.
Edit the trust policy of the role to ensure that it correctly allows the sts
action for the role ARN in the child account.
Update the Role ARN:
Verify that the target role ARN specified in the trust policy matches the role ARN created by the CloudFormation stack in the child account.
If necessary, update the ARN to reflect the correct role in the child account.
Save and Test:
Save the updated trust policy and ensure there are no syntax errors.
Test the setup by attempting to assume the role from the EC2 instance in the child account. Verify that the instance can successfully assume the role and perform the required actions.
This ensures that the EC2 instance in the child account can assume the role in the parent account, resolving the permission issue.
Reference
AWS IAM Documentation on Trust Policies51.
Willow
3 months agoRhea
3 months agoAllene
3 months agoWillis
4 months agoTheresia
4 months agoNu
4 months agoWava
4 months agoEdgar
4 months agoLinsey
5 months agoRyann
5 months agoLeonardo
5 months agoMadalyn
5 months agoNan
5 months agoEmilio
5 months agoDelpha
2 years agoNickolas
1 year agoFelix
1 year agoKarrie
1 year agoLouann
2 years agoKatie
1 year agoDelbert
1 year agoEleonora
1 year agoBrittani
1 year agoPete
2 years agoKirk
2 years agoRaylene
2 years agoRashad
1 year agoPaulene
2 years agoLatrice
2 years agoVeronica
2 years agoCoral
2 years agoLucy
2 years agoCherri
1 year agoFrance
1 year agoMabel
2 years agoCharlene
2 years agoJesusita
2 years agoLea
2 years agoClay
2 years ago