ANS-C01 Network Design Practice Question
Exhibit
Refer to the exhibit.
```
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:CreateVpc", "ec2:DeleteVpc", "ec2:CreateSubnet", "ec2:DeleteSubnet" ], "Resource": "*", "Condition": { "StringEquals": { "aws:RequestedRegion": "us-east-1" } } } ]}
```An IAM policy attached to a user allows creating and deleting VPCs and subnets only in us-east-1. The user attempts to create a VPC in eu-west-1. What will happen?
⚠ Common exam trap
It's easy for candidates to assume a policy that allows ec2:CreateVpc without a resource restriction will permit VPC creation in any region, but they overlook the Condition element that scopes the permission to a specific region, causing them to pick Option D.
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 API call will be denied with an authorization error.
The IAM policy explicitly restricts the ec2:CreateVpc action to us-east-1 using a Condition element with ec2:Region. When the user attempts to create a VPC in eu-west-1, the condition is not satisfied, so the request is denied with an authorization error (HTTP 403). IAM policies are evaluated before any API call is executed, and if the condition fails, the action is blocked regardless of the resource-level permissions.
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 API call will be denied with an authorization error.
Why this is correct
The condition fails, so IAM denies the action.
- ✗
The VPC will be created but the user will receive a warning.
Why it's wrong here
IAM denies if condition not met; no warning.
- ✗
The user can create the VPC because the condition is not applicable to VPC creation.
Why it's wrong here
The condition applies to all actions in the statement.
- ✗
The VPC will be created successfully because the policy allows ec2:CreateVpc.
Why it's wrong here
The condition restricts to us-east-1, so creation in eu-west-1 is denied.
Visual reference
Go deeper
Related to this question
About these practice questions
This ANS-C01 question is part of Courseiva's 1,621-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 ANS-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 ANS-C01 exam.