SAP-C02 Practice Question: Accelerate Workload Migration and Modernization
A company is migrating a 3-tier web application from on-premises to AWS. The application consists of a Linux Apache HTTP server, a Java application server (Tomcat), and a MySQL database. The company wants to use AWS managed services to reduce operational overhead. The migration plan includes using AWS Elastic Beanstalk for the web and application tiers, and Amazon RDS for MySQL for the database. During a test migration, the team notices that the application is experiencing intermittent connection timeouts when the web tier attempts to connect to the application tier. The web and application tiers are deployed in separate Elastic Beanstalk environments, both in the same VPC, same region, and same Availability Zone. The security groups allow traffic from the web tier to the application tier on port 8080. What is the MOST likely cause of the connection timeouts?
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 web tier is trying to connect directly to the application tier instances, but the application tier's security group does not allow inbound traffic from the web tier's security group.
The most likely cause is that the web tier is configured to connect directly to the application tier instances rather than to the application tier's load balancer. In Elastic Beanstalk, each environment typically includes an Auto Scaling group and a load balancer. For the web tier to communicate with the application tier, it should connect to the application tier's load balancer DNS name. If the web tier attempts to connect directly to the application tier instances, the application tier's security group must allow inbound traffic from the web tier's security group. If that rule is missing or misconfigured, connections will time out. Option A is incorrect because DNS resolution for an internal ALB generally works within the same VPC. Option B is incorrect because both environments are in the same Availability Zone. Option D is incorrect because health check misconfiguration would affect the load balancer's routing, not cause direct connection timeouts between tiers.
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 application tier is configured with an internal Application Load Balancer, but the web tier is unable to resolve the DNS name of the load balancer.
Why it's wrong here
Elastic Beanstalk provides a DNS name; resolution should work within the same VPC.
- ✗
The web tier and application tier are in different Availability Zones, causing increased latency and timeouts.
Why it's wrong here
Both tiers are in the same AZ.
- ✓
The web tier is trying to connect directly to the application tier instances, but the application tier's security group does not allow inbound traffic from the web tier's security group.
Why this is correct
The web tier should connect to the application tier's load balancer, but the security group of the load balancer must allow traffic from the web tier.
- ✗
The Elastic Beanstalk environment's health check URL is misconfigured, causing the instances to be marked as unhealthy and removed from the load balancer.
Why it's wrong here
Health check issues would cause 503s, not intermittent timeouts.
Visual reference
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 1,660-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 SAP-C02 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 SAP-C02 exam.