ANS-C01 Network Security, Compliance and Governance Practice Question
A company is setting up a cross-account VPC peering connection between VPC A (account 1) and VPC B (account 2). The security team wants to ensure that only specific TCP ports are allowed between the VPCs. They have configured the route tables and the VPC peering connection is active. Which additional configuration is required to enforce the port restriction?
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
✓
Update the security groups in both VPCs to allow inbound traffic only on the required ports from the peered VPC's CIDR or security group.
Security groups can reference security groups from peered VPCs across accounts when the VPC peering connection is active, allowing fine-grained control over specific TCP ports at the instance level. Option A is incorrect because modifying network ACLs is possible but they are stateless and apply at the subnet level, not instance level; also, network ACLs cannot reference security groups from peered VPCs. Option B is incorrect because network ACLs are stateless, not stateful; security groups are stateful. Option D is incorrect because route tables control the path of traffic, not port-level filtering; they cannot deny traffic based on ports.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Modify the network ACLs in both VPCs to allow inbound traffic only on the required ports.
Why it's wrong here
Network ACLs apply to subnets, not instances, and cannot reference security groups.
- ✗
Use network ACLs with stateful filtering to allow only the required ports.
Why it's wrong here
Network ACLs are stateless and require rules for both inbound and outbound traffic; they do not provide stateful filtering.
- ✓
Update the security groups in both VPCs to allow inbound traffic only on the required ports from the peered VPC's CIDR or security group.
Why this is correct
Security groups can restrict traffic based on port and protocol at the instance level.
- ✗
Configure the route tables to deny traffic on all ports except the allowed ones.
Why it's wrong here
Route tables only control traffic direction, not port filtering.
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.