DVA-C02 Deployment Practice Question
A company uses AWS Elastic Beanstalk to deploy a web application. The application requires a database connection string that is different for each environment (development, staging, production). The developer wants to set these values without hardcoding them in the application code. Which configuration method should the developer use?
⚠ Common exam trap
The trap here is that candidates often overcomplicate the solution by choosing AWS Systems Manager Parameter Store (Option D) for secret management, but the question specifically asks for a configuration method within Elastic Beanstalk's native features, where environment properties are the simplest and most direct approach for environment-specific values, even for sensitive ones like database connection strings.
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
✓
Use environment properties in the Elastic Beanstalk console
Elastic Beanstalk environment properties allow you to inject configuration values (like database connection strings) into your application at deployment time without hardcoding them. These properties are set per environment in the Elastic Beanstalk console or via CLI, and the application retrieves them as environment variables, making them environment-specific. While database connection strings are sensitive, environment properties are the simplest configuration method within Elastic Beanstalk for such values. AWS Systems Manager Parameter Store (Option D) is more secure for secrets but is not a native Elastic Beanstalk feature and requires additional setup; the question specifically asks for a configuration method within Elastic Beanstalk's native capabilities.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the .ebextensions configuration files with environment-specific snippet files
Why it's wrong here
Hardcoding environment-specific values within .ebextensions files violates the principle of separating configuration from code, as these files are typically committed to version control alongside the application. This method is intended for automating infrastructure provisioning or installing software packages during deployment. You would use this approach to ensure that every environment consistently installs specific system dependencies or runs setup scripts upon instance launch.
- ✓
Use environment properties in the Elastic Beanstalk console
Why this is correct
Elastic Beanstalk environment properties are the native and recommended mechanism for passing configuration values to your application. These properties are defined directly within the Elastic Beanstalk environment configuration, either via the console, CLI, or configuration files, and are automatically injected as environment variables into the application's runtime on the EC2 instances. This allows for distinct configurations, such as database endpoints or API keys, to be managed separately for development, staging, and production environments without modifying application code.
- ✗
Use Amazon RDS within Elastic Beanstalk
Why it's wrong here
Amazon RDS (Relational Database Service) is a fully managed database service designed to host relational databases like MySQL, PostgreSQL, or SQL Server. While an Elastic Beanstalk application frequently connects to and utilizes an RDS instance for data storage, RDS itself does not provide a mechanism for passing general application configuration values or environment-specific settings to the web application. Its sole purpose is database management, not application configuration injection.
- ✗
Use AWS Systems Manager Parameter Store with an IAM instance profile
Why it's wrong here
Systems Manager Parameter Store securely stores configuration and secrets, and using an IAM instance profile is the correct way for EC2 instances to access it, making it a tempting choice. However, for Elastic Beanstalk, this method requires the application to explicitly retrieve values at runtime. Elastic Beanstalk's native environment properties are specifically designed to inject environment-specific variables directly into the application container, eliminating the need for additional retrieval code. Parameter Store would be suitable if the application was not on Beanstalk or required shared secrets across disparate services.
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 724-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 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.