AWS Certified DevOps Engineer - Professional free question 10 / 10 · Domain 6: Security and Compliance
An IAM user has an identity-based policy that allows the iam:CreateUser action and all Amazon S3 actions. The permissions boundary set on the user allows the actions of Amazon S3, Amazon CloudWatch and Amazon EC2 and nothing else. What can the user do?
- Create IAM users and perform Amazon S3 actions, as the boundary adds its permissions to those of the identity-based policy
- Create IAM users, as an allow in the identity-based policy overrides a missing allow in the boundary
- Perform the actions of Amazon CloudWatch and Amazon EC2, as the boundary grants them to the user
- Perform Amazon S3 actions but not create IAM users, as the effective permissions are the intersection of the two policies
Show the answer and explanation
Answer: D
Why this is correct
A permissions boundary sets the maximum permissions that an identity-based policy can grant to an IAM entity. The effective permissions are the intersection of the identity-based policies and the boundary, so an action works only when both allow it. The user can run Amazon S3 actions, which both allow. iam:CreateUser fails because the boundary does not allow it, and the CloudWatch and EC2 actions in the boundary grant nothing because no identity-based policy allows them.
Why the other options are wrong
"Create IAM users and perform Amazon S3 actions, as the boundary adds its permissions to those of the identity-based policy" … A permissions boundary sets the maximum permissions. It limits the permissions of the user but does not provide permissions on its own, so it cannot add to the identity-based policy.
"Create IAM users, as an allow in the identity-based policy overrides a missing allow in the boundary" … The entity can perform only the actions that are allowed by both its identity-based policies and its permissions boundary. The boundary does not allow iam:CreateUser, so the operation fails.
"Perform the actions of Amazon CloudWatch and Amazon EC2, as the boundary grants them to the user" … The boundary does not provide permissions on its own. The identity-based policy has to allow CloudWatch and EC2 actions as well, and in this case it does not.
Key points
Effective permissions = identity-based policy AND permissions boundary. A boundary never grants permissions on its own.