0
0
AWScloud~20 mins

Policy evaluation logic in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Policy Evaluation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does AWS evaluate conflicting policies?

In AWS, when a user has multiple policies attached that conflict, what is the final decision for an action?

AExplicit deny always overrides any allow, so the action is denied.
BAllow always overrides deny, so the action is allowed.
CThe last policy attached to the user determines the decision.
DAWS randomly picks allow or deny if policies conflict.
Attempts:
2 left
💡 Hint

Think about what happens if one policy says no and another says yes.

service_behavior
intermediate
2:00remaining
What happens if no policy explicitly allows an action?

If a user tries to perform an action but none of their policies explicitly allow it, what is the result?

AThe action is allowed by default.
BThe action is allowed only if the user is an administrator.
CThe action is allowed if the resource policy allows it.
DThe action is denied by default.
Attempts:
2 left
💡 Hint

Think about the default stance of AWS when no explicit permission is given.

Configuration
advanced
2:00remaining
Identify the effect of this IAM policy snippet

Given this IAM policy snippet, what is the effect on the s3:DeleteObject action?

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:DeleteObject",
      "Resource": "arn:aws:s3:::example-bucket/*"
    },
    {
      "Effect": "Deny",
      "Action": "s3:DeleteObject",
      "Resource": "arn:aws:s3:::example-bucket/private/*"
    }
  ]
}
AUsers cannot delete any objects in the bucket.
BUsers can delete objects except those in the private folder.
CUsers can delete any object in the bucket including private folder objects.
DUsers can only delete objects in the private folder.
Attempts:
2 left
💡 Hint

Consider how explicit deny affects specific resource paths.

security
advanced
2:00remaining
What is the impact of a missing Action field in an IAM policy statement?

Consider this IAM policy statement missing the Action field:

{
  "Effect": "Allow",
  "Resource": "*"
}

What will happen when this policy is evaluated?

AThe policy allows all actions on all resources.
BThe policy allows no actions because <code>Action</code> is required.
CThe policy is invalid and will cause an error when attached.
DThe policy denies all actions because <code>Action</code> is missing.
Attempts:
2 left
💡 Hint

Think about required fields in IAM policy statements.

Architecture
expert
3:00remaining
Order the steps AWS uses to evaluate a request with multiple policies

Arrange the following steps in the correct order AWS evaluates an IAM request with multiple policies:

A1,4,2,3
B4,1,2,3
C2,1,4,3
D1,2,4,3
Attempts:
2 left
💡 Hint

Remember explicit deny overrides all, and resource policies are checked after user policies.