ANS-C01 Security Group Statefulness Practice Question
A small company has a single VPC with one public subnet and one private subnet. They have a web server in the public subnet and a database server in the private subnet. The web server needs to access the database server on port 3306 (MySQL). The network engineer has configured the security group for the database server to allow inbound TCP port 3306 from the security group of the web server. However, the web server cannot connect to the database server. The network ACL for the private subnet is the default (allows all inbound and outbound). The web server can ping the database server's private IP. What is the MOST likely cause of the connection failure?
⚠ Common exam trap
Remember that security groups are stateful and automatically allow return traffic. The default network ACL allows all inbound and outbound traffic. If ping works but a specific port connection fails, the application service may not be running.
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 MySQL service on the database server is not running or not listening on port 3306
The database server's security group is correctly configured to allow inbound traffic from the web server's security group on port 3306. The network ACL for the private subnet is default allow, so it is not blocking traffic. The web server can ping the database server's private IP, indicating network connectivity exists. Therefore, the issue is that the MySQL service on the database server is not running or not listening on port 3306. Option D is correct.
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 web server cannot reach the private IP of the database server because it is in a different subnet
Why it's wrong here
Incorrect; within the same VPC, instances can communicate across subnets.
- ✗
The network ACL for the private subnet is blocking inbound traffic on port 3306
Why it's wrong here
Incorrect; the default NACL allows all inbound traffic.
- ✗
The security group for the database server is not allowing inbound traffic from the web server's security group
Why it's wrong here
Incorrect; it does allow.
- ✓
The MySQL service on the database server is not running or not listening on port 3306
Why this is correct
Correct; the application layer is the most likely issue.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every ANS-C01 question from scratch — 1,621 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 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.