An enterprise implements a multi-account AWS environment under AWS Organizations. Corporate data analysts authenticate through an external SAML 2.0 Identity Provider (IdP) to access AWS. Upon authentication, users assume a federated role named `SAML-Analyst-Role` in a centralized Identity AWS account (Account ID: `111122223333`). From this role, analysts need to assume a cross-account role named `Athena-Query-Role` in a target Analytics member account (Account ID: `123456789012`) to run database queries. The trust policy for `Athena-Query-Role` in the Analytics account is configured as follows:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111122223333:role/SAML-Analyst-Role"
},
"Action": "sts:AssumeRole"
}
]
}
The default `FullAWSAccess` Service Control Policy (SCP) has been detached from the Analytics Organizational Unit (OU) containing the Analytics account, and only the following custom SCP is attached:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AnalyticsAccessOnly",
"Effect": "Allow",
"Action": [
"athena:*",
"glue:*",
"s3:*",
"kms:*"
],
"Resource": "*"
}
]
}
When data analysts attempt to switch roles to `Athena-Query-Role` from their federated session, they receive an Access Denied error. Which combination of configuration changes will resolve this issue?
- Update the SCP on the Analytics OU to include `sts:AssumeRole` in the list of allowed actions, and attach an IAM policy to the `SAML-Analyst-Role` in the Identity account that grants `sts:AssumeRole` permissions on the `Athena-Query-Role` ARN.Answer
- BAdd `sts:AssumeRole` to the SCP on the Analytics OU. Because the SCP explicitly allows this action on the OU, no additional IAM policies need to be attached to the `SAML-Analyst-Role` in the Identity AWS account.
- CModify the trust policy of the `Athena-Query-Role` in the Analytics account to change the allowed action from `sts:AssumeRole` to `sts:AssumeRoleWithSAML` since the users originate from a SAML-federated session.
- DAttach an IAM policy to the `SAML-Analyst-Role` in the Identity account that grants `sts:AssumeRole` permissions on the `Athena-Query-Role` ARN. No changes are required for the SCP since SCPs only restrict IAM principals created within the member account and do not apply to cross-account role assumptions.