A company is using AWS Organizations with multiple accounts. The Security team wants to centrally manage IAM roles that can be assumed by users in member accounts. Which solution should be used to enforce that only specific roles can be assumed across accounts, while ensuring that the policy updates are automatically applied to all accounts?
Trap 1: Use AWS Single Sign-On (SSO) to assign permissions to users across…
Incorrect. AWS SSO manages user access to accounts but does not centrally manage cross-account IAM roles as described.
Trap 2: Create an IAM role in the Security account with a trust policy that…
Incorrect. Trust policies cannot reference SCPs; SCPs are attached at the OU or account level and are not referenced within a trust policy.
Trap 3: Create a resource-based policy on each IAM role in the member…
Incorrect. IAM roles use trust policies, not resource-based policies. Resource-based policies are for services like S3 buckets.
- A
Create an IAM role in each member account with a trust policy that allows the Security account, and use AWS CloudFormation StackSets to deploy the roles.
Correct. Creates roles in member accounts with trust policies allowing the Security account to assume them, deployed via StackSets for centralized management and automatic updates.
- B
Use AWS Single Sign-On (SSO) to assign permissions to users across accounts.
Why wrong: Incorrect. AWS SSO manages user access to accounts but does not centrally manage cross-account IAM roles as described.
- C
Create an IAM role in the Security account with a trust policy that references a service control policy (SCP) in AWS Organizations.
Why wrong: Incorrect. Trust policies cannot reference SCPs; SCPs are attached at the OU or account level and are not referenced within a trust policy.
- D
Create a resource-based policy on each IAM role in the member accounts that allows the Security account to assume the role.
Why wrong: Incorrect. IAM roles use trust policies, not resource-based policies. Resource-based policies are for services like S3 buckets.