Question 970 of 1,616
DeploymenteasyMultiple ChoiceObjective-mapped

Quick Answer

The answer is a bug in the new application code that causes the application to crash. A 502 Bad Gateway error from the nginx proxy indicates that the reverse proxy cannot establish a successful connection to the application backend running on the Elastic Beanstalk environment’s designated port. Since the application was working before the deployment and immediately became unresponsive afterward, the most likely cause is that the new code introduced a runtime error, preventing the application process from starting or causing it to crash repeatedly. On the AWS Certified Developer Associate DVA-C02 exam, this scenario tests your understanding of Elastic Beanstalk’s architecture, specifically how the nginx proxy acts as a front-end and relies on a healthy application listener. A common trap is to suspect configuration issues with the load balancer or security groups, but the key clue is that the error appeared right after a deployment. Memory tip: “502 means the app is sick” — the proxy is healthy, but the backend process is failing.

DVA-C02 Deployment Practice Question

This DVA-C02 practice question tests your understanding of deployment. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company uses AWS Elastic Beanstalk to deploy a Python web application. After a recent deployment, the environment health turns 'Severe' and the application becomes unresponsive. The developer checks the logs and finds multiple '502 Bad Gateway' errors from the nginx proxy. The application was working before the deployment. What is the MOST likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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 new application code has a bug that causes the application to crash.

A 502 Bad Gateway error from nginx means the reverse proxy cannot communicate with the application backend. Since the application was working before the deployment and became unresponsive immediately after, the most likely cause is a bug in the new code that causes the application process to crash or hang. Elastic Beanstalk's nginx proxy expects a healthy response from the application on the designated port; if the application fails to start or crashes repeatedly, nginx returns 502 errors.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 new application code has a bug that causes the application to crash.

    Why this is correct

    Crashing application causes nginx to return 502.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The Procfile is missing from the application source.

    Why it's wrong here

    Missing Procfile would cause a different error.

  • The environment's load balancer is not configured correctly.

    Why it's wrong here

    Load balancer configuration is unlikely to change during deployment.

  • The environment variables are not set correctly.

    Why it's wrong here

    Missing env vars would cause application errors, not necessarily 502.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse a 502 error with a load balancer misconfiguration or environment variable issue, but the key clue is that the problem started immediately after a code deployment, pointing directly to a bug in the new application code.

Detailed technical explanation

How to think about this question

In Elastic Beanstalk, the nginx proxy acts as a reverse proxy that forwards requests to the application server (e.g., Gunicorn or uWSGI) via a Unix socket or TCP port. A 502 error indicates that nginx received an invalid or no response from the upstream application server. Common causes include the application process crashing due to unhandled exceptions, memory exhaustion, or a missing dependency introduced in the new code. The health check path configured in the environment must return a 200 OK; if the application crashes, the health check fails and the environment turns 'Severe'.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related DVA-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DVA-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DVA-C02 question test?

Deployment — This question tests Deployment — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The new application code has a bug that causes the application to crash. — A 502 Bad Gateway error from nginx means the reverse proxy cannot communicate with the application backend. Since the application was working before the deployment and became unresponsive immediately after, the most likely cause is a bug in the new code that causes the application process to crash or hang. Elastic Beanstalk's nginx proxy expects a healthy response from the application on the designated port; if the application fails to start or crashes repeatedly, nginx returns 502 errors.

What should I do if I get this DVA-C02 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on DVA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company uses AWS Elastic Beanstalk to deploy a Python web application. After a successful deployment, the environment's health turns 'Severe' and the application returns HTTP 502 errors. What is the most likely cause?

medium
  • A.The EC2 instances have insufficient storage for the deployment.
  • B.The application's requirements.txt file is missing a required dependency.
  • C.The load balancer's health check path is incorrectly configured.
  • D.The RDS database connection string is incorrect.

Why B: Option A is correct because if the application's dependencies (e.g., Python packages) are not included or installed, the application fails to start, causing a 502 error. Option B is incorrect because an incorrectly configured load balancer would cause 503 or 504 errors. Option C is incorrect because exceeding instance storage would cause disk full errors, not 502. Option D is incorrect because RDS connection string misconfiguration would cause application errors but not necessarily 502; the web server would still respond.

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-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 DVA-C02 exam.