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.
Delpha
3 months agoNickolas
3 months agoFelix
3 months agoKarrie
3 months agoLouann
4 months agoKatie
2 months agoDelbert
2 months agoEleonora
3 months agoBrittani
3 months agoPete
4 months agoKirk
4 months agoRaylene
4 months agoRashad
3 months agoPaulene
4 months agoLatrice
4 months agoVeronica
4 months agoCoral
4 months agoLucy
4 months agoCherri
3 months agoFrance
3 months agoMabel
3 months agoCharlene
4 months agoJesusita
4 months agoLea
4 months agoClay
4 months ago