Question 1
A company wants to enforce that all new IAM roles in member accounts have a specific permissions boundary attached. Which approach enforces this centrally?
- A CloudWatch alarm on the number of IAM roles in each account
- An SCP requiring the approved iam:PermissionsBoundary on CreateRole — Correct
- An IAM password policy that requires boundaries for every user
- An AWS Config rule that sends a weekly report of roles without the boundary
Correct answer
An SCP requiring the approved iam:PermissionsBoundary on CreateRole
Explanation
An SCP condition on iam:PermissionsBoundary enforces the boundary at creation time. Config reports and alarms only detect. Password policies do not apply to roles.
Question 2
A company has a resource policy on a KMS key and an S3 bucket that it wants to restrict so that only principals from its AWS organization can use them, without listing account IDs. Which condition key should be used?
- aws:SourceVpce
- aws:SourceIp
- aws:RequestedRegion
- aws:PrincipalOrgID — Correct
Correct answer
aws:PrincipalOrgID
Explanation
aws:PrincipalOrgID restricts access to principals in the organization. SourceVpce, SourceIp, and RequestedRegion restrict network path, IP, and Region.
Question 3
A company has an application that uses an EC2 instance role. The security team wants to make sure that credentials taken from this instance cannot be used from other networks. Which condition keys in the role's policy help? (Choose TWO.)
- aws:TokenIssueTime only
- aws:MultiFactorAuthPresent
- aws:EC2InstanceSourcePrivateIPv4 — Correct
- aws:RequestedRegion
- aws:EC2InstanceSourceVPC — Correct
Correct answer
aws:EC2InstanceSourcePrivateIPv4; aws:EC2InstanceSourceVPC
Explanation
These condition keys compare the request's network origin with the instance's VPC and private IP, which blocks use of stolen credentials elsewhere. MFA, Region, and issue time alone do not tie credentials to the instance's network.
Question 4
A company wants to give employees access to internal web applications without a VPN, based on their identity provider groups and device security posture, with every request evaluated. Which service fits BEST?
- AWS Verified Access — Correct
- AWS Site-to-Site VPN
- Amazon Cognito user pools
- AWS Client VPN
Correct answer
AWS Verified Access
Explanation
Verified Access evaluates every request using identity and device posture without a VPN. Client VPN is a VPN. Cognito authenticates app users but does not evaluate device posture for network access. Site-to-Site VPN connects networks.
Question 5
A company's security team wants to block users from disabling MFA or deleting MFA devices for other users. Which control fits BEST?
- A Config rule that emails the security team whenever an MFA device is removed from a user
- A password policy that requires MFA devices to be replaced every 90 days for all users
- A GuardDuty suppression rule that hides findings about MFA changes in member accounts
- An SCP that denies iam:DeactivateMFADevice and iam:DeleteVirtualMFADevice except for an approved admin role — Correct
Correct answer
An SCP that denies iam:DeactivateMFADevice and iam:DeleteVirtualMFADevice except for an approved admin role
Explanation
An SCP prevents MFA removal except by approved roles. Config emails and suppression rules do not prevent it. Password policies do not manage MFA devices.
Question 6
An IAM policy allows s3:GetObject on a bucket. A service control policy attached to the account's OU does not mention S3. The bucket policy does not mention the user. Can the user read objects in the bucket, which is in the same account?
- Yes, because the identity-based policy allows the action and SCPs only deny actions that they list.
- No, because the SCP does not allow S3 actions, and SCPs must allow an action for it to be permitted. — Correct
- Yes, because a same-account bucket policy is required only when it explicitly denies the action.
- No, because the bucket policy must explicitly allow the user for any same-account access.
Correct answer
No, because the SCP does not allow S3 actions, and SCPs must allow an action for it to be permitted.
Explanation
SCPs act as filters: an action must be allowed by the SCPs in effect (for example, by FullAWSAccess or an explicit allow). If the SCP allow list omits S3, access is denied. In the same account, the bucket policy is not required when the identity policy allows the action.
Question 7
A workload running in an on-premises data center must access AWS APIs with short-term credentials. The company has an existing private certificate authority. Which solution fits BEST?
- Amazon Cognito user pools with a username and password for each server
- An IAM user with access keys stored in the server's credentials file
- AWS IAM Identity Center with each server registered as a user
- IAM Roles Anywhere with a trust anchor that references the company's CA — Correct
Correct answer
IAM Roles Anywhere with a trust anchor that references the company's CA
Explanation
IAM Roles Anywhere exchanges X.509 certificates for temporary credentials. IAM user keys are long-term. Cognito user pools and Identity Center are for people, not servers.
Question 8
A security engineer must provide break-glass access to the management account of an organization when the identity provider is unavailable. Which approach is recommended?
- Store emergency access keys in a public code repository for quick retrieval.
- MFA-protected emergency credentials with a sealed process and alerts on use — Correct
- Share an emergency IAM user's password with all administrators by email.
- Disable all emergency access, because the identity provider never fails.
Correct answer
MFA-protected emergency credentials with a sealed process and alerts on use
Explanation
Emergency credentials protected by MFA, strict procedures, and alerting provide controlled break-glass access. No emergency access risks lockout. Sharing passwords or storing keys publicly is insecure.
Question 9
A company wants to restrict all IAM users in an account from making API calls unless they come from the corporate network or through the company's VPC endpoints. Which policy design is correct?
- Allow actions only when aws:SourceIp matches the corporate range, and rely on that allow to cover VPC endpoint traffic.
- Deny unless the request comes from the corporate IP range or the company's VPC endpoints. — Correct
- Allow actions when aws:RequestedRegion equals the corporate network's Region.
- Deny actions when aws:SourceVpce matches the company's endpoints, so that only internet traffic is allowed.
Correct answer
Deny unless the request comes from the corporate IP range or the company's VPC endpoints.
Explanation
A deny with both IP and VPC endpoint conditions, plus service exceptions such as aws:ViaAWSService, enforces the network boundary. SourceIp does not apply to VPC endpoint traffic. The other options invert or misuse conditions.
Question 10
A company's API uses JWTs from a Cognito user pool. Security requires that a stolen refresh token can be invalidated immediately. What should the engineer do?
- Delete the user pool, which invalidates every token that users hold today.
- Rotate the user pool's signing keys manually through the Cognito console.
- Enable token revocation and call RevokeToken or GlobalSignOut for the user. — Correct
- Increase the access token lifetime so that refresh tokens are rarely used.
Correct answer
Enable token revocation and call RevokeToken or GlobalSignOut for the user.
Explanation
Token revocation invalidates refresh tokens and the access tokens issued from them. Deleting the pool is destructive. Longer access tokens increase risk. Signing keys cannot be rotated manually.