PAS-C01 Explicit Deny Practice Question
Exhibit
Refer to the exhibit.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:StartInstances",
"ec2:StopInstances"
],
"Resource": "arn:aws:ec2:us-east-1:123456789012:instance/*",
"Condition": {
"StringEquals": {
"ec2:ResourceTag/Environment": "production"
}
}
},
{
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": "us-east-1"
}
}
}
]
}An operations team uses this IAM policy for a role assumed by SAP administrators. An administrator tries to stop a production SAP HANA instance in the us-west-2 region but receives an access denied error. What is the cause?
⚠ Common exam trap
Candidates often focus on the Allow statement's region-specific resource ARN and overlook the Deny statement's condition on aws:RequestedRegion, which explicitly blocks all actions outside us-east-1.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The Deny statement with a condition on aws:RequestedRegion prevents actions outside us-east-1.
The Deny statement includes a condition using aws:RequestedRegion that blocks any action unless the request is made in us-east-1. Since the administrator's request is in us-west-2, the condition fails and the Deny applies, causing the access denied error. Option A is incorrect because the Allow statement's resource ARN is for us-east-1, but the Deny overrides the Allow; the resource region is not the primary issue. Option B is incorrect because even if the instance has the tag, the Deny still overrides. Option C is incorrect because the Deny does not require a tag; it checks the region.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The Allow statement's resource ARN specifies us-east-1, but the instance is in us-west-2.
Why it's wrong here
The resource ARN uses a wildcard for instance ID, not region.
- ✗
The Allow statement only permits stopping instances with the tag Environment=production, and the instance does not have that tag.
Why it's wrong here
The error is not about tags; the deny applies regardless.
- ✗
The Deny statement requires the resource to have a specific tag, which is missing.
Why it's wrong here
The Deny statement does not include a tag condition.
- ✓
The Deny statement with a condition on aws:RequestedRegion prevents actions outside us-east-1.
Why this is correct
The condition denies all actions if the request is not in us-east-1.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PAS-C01 question from scratch — 1,616 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PAS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PAS-C01 exam.