Using Console
Using CLI
<RoleName>
with the name of the IAM Role you want to create and <PolicyDocument.json>
with the path to the JSON file containing the trust policy for the role.<RoleName>
with the name of the IAM Role you created in step 1 and <PolicyARN>
with the ARN of the policy you want to attach to the role.<StackName>
with the name of the CloudFormation stack you want to update, <RoleARN>
with the ARN of the IAM Role you created in step 1.After following these steps, the CloudFormation stack will have an IAM Role associated with it, thus remediating the misconfiguration.Using Python