DOP-C02 SDLC Automation Practice Question
A company uses AWS Elastic Beanstalk to deploy a web application. They have set up a CI/CD pipeline using AWS CodePipeline. The pipeline has a source stage from GitHub (using the GitHub source action) and a deploy stage that deploys to Elastic Beanstalk. The deployment is configured to use the 'Immutable' deployment policy. Recently, the deployment started failing with the error: 'The environment is in an unhealthy state. The deployment failed.' The developer checks the Elastic Beanstalk environment and sees that the new instances are not passing health checks. The application logs show that the new instances cannot connect to the existing Amazon RDS database. What is the most likely cause?
⚠ Common exam trap
DOP-C02 often tests whether candidates blame the deployment policy or application code when the real issue is a security group/network rule that only manifests for newly launched instances.
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 security group attached to the Elastic Beanstalk environment does not allow the new instances to connect to the RDS database.
With the Immutable deployment policy, Elastic Beanstalk launches a fresh set of instances in a new Auto Scaling group; if those new instances cannot reach the RDS database, the most likely cause is that the environment's security group (or the RDS security group's inbound rules) does not permit the new instances to connect. Since the old instances worked, a security group rule scoped to the old instances or a missing rule for the new group is the classic culprit.
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 RDS database is not available because it is being updated during the deployment.
Why it's wrong here
This is incorrect because the RDS database is an independent managed service and its lifecycle is not tied to the Elastic Beanstalk deployment. If the database were being updated, you would see a maintenance window, a failover event, or a status of 'modifying' in the RDS console, but the deployment logs for the application show connection failures, not an unavailable RDS endpoint. Even during a Multi-AZ failover, connections typically recover within a minute; a persistent failure is much more likely a network permission issue than an RDS update.
- ✗
The deployment policy should be changed to 'Rolling' to ensure instances are updated in place.
Why it's wrong here
Changing the deployment policy to 'Rolling' will not resolve the problem because rolling updates do not perform 'in-place' patch updates—they still terminate existing instances and launch new ones in batches. Each newly launched instance receives the current security group assigned to the Elastic Beanstalk environment, so if that security group is not authorized in the RDS security group's inbound rules, the new instances will still be unable to connect. The root cause is a security group misconfiguration, not the deployment strategy, so modifying the policy only changes how failures are rolled out, not whether the database connection succeeds.
- ✓
The security group attached to the Elastic Beanstalk environment does not allow the new instances to connect to the RDS database.
Why this is correct
This is correct. When Elastic Beanstalk performs a deployment that replaces instances (such as an immutable or rolling update with a new Auto Scaling group), the new instances are launched with the environment's current security group. If that security group is not explicitly added as an allowed source in the RDS database's security group inbound rules, the new instances will be denied TCP (or PostgreSQL/MySQL) connections, even though the application code and database settings are unchanged. You must authorize the Elastic Beanstalk environment's security group ID (or its attached load balancer's security group) in the RDS security group to allow traffic from the latest instance replacements.
- ✗
The application code has a bug that causes the health check to fail.
Why it's wrong here
This is wrong because the application logs and health check failures are symptoms, not the root cause. If the code had a bug that caused the health check to fail, you would see HTTP 5xx errors, timeouts in the app logs, or application-level exceptions; however, the reported logs indicate a database connectivity error (e.g., 'connection timed out' or 'could not connect to server'). The health check is likely failing because the application cannot start or respond due to failed DB connections, but the underlying issue is network security, not the code itself. Therefore, fixing the code would not address the real problem.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DOP-C02 question from scratch — 1,298 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
This DOP-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 DOP-C02 exam.