A company is configuring identity federation using an external SAML 2.0 Identity Provider (IdP) to allow corporate users to log directly into a specific AWS member account. A Solutions Architect creates the SAML Identity Provider in IAM and defines an IAM role for the federated users. However, during testing, users receive an Access Denied error when attempting to assume the role via SAML assertion. Which configuration issue is the most likely cause of this error?
- AThe Service Control Policy (SCP) at the root level of the organization has not been configured to explicitly grant the federated users permissions to assume the role.
- The trust policy of the IAM role specifies the action sts:AssumeRole instead of sts:AssumeRoleWithSAML for the SAML provider principal.Answer
- CThe trust policy of the IAM role specifies sts:AssumeRoleWithWebIdentity as the allowed action for the SAML provider principal.
- DThe SAML provider metadata has not been registered as an IAM user within the master account of the AWS Organization.
Answer
The trust policy of the IAM role specifies the action sts:AssumeRole instead of sts:AssumeRoleWithSAML for the SAML provider principal.
The correct answer is that the trust policy must use the sts:AssumeRoleWithSAML action for SAML-based identity federation. Using sts:AssumeRole is incorrect because it is only for standard cross-account or direct assume role requests using IAM credentials.
Step-by-Step Solution
Key Concept
SAML 2.0 Federation Trust Policy Configuration
Estimated Time:45s