Courseiva
Question 619 of 724
DeploymenteasyMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A developer is deploying an application using AWS Elastic Beanstalk. The application needs to connect to an Amazon RDS database. What is the best practice for storing database credentials?

⚠ Common exam trap

It's easy for candidates to confuse Elastic Beanstalk environment properties with secure storage, not realizing they are stored in plaintext and accessible via the environment configuration, unlike Secrets Manager which provides encryption and rotation.

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

Store credentials in AWS Secrets Manager and retrieve them at runtime.

AWS Secrets Manager provides a secure, auditable service for rotating and managing database credentials. By retrieving secrets at runtime via the AWS SDK, the application avoids embedding sensitive data in code or configuration, which is a key security best practice for Elastic Beanstalk deployments.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Hardcode the credentials in the application code.

    Why it's wrong here

    Hardcoding credentials directly into application code is a severe security vulnerability. These credentials become embedded in source control repositories, deployment artifacts, and potentially accessible to anyone with code access, making them extremely difficult to rotate or revoke without redeploying the entire application. This practice violates the principle of least privilege and significantly increases the attack surface if the code repository or deployed application is compromised.

  • Store credentials in Elastic Beanstalk environment properties.

    Why it's wrong here

    Storing sensitive credentials directly in Elastic Beanstalk environment properties is not a secure practice. While these properties are passed to the application as environment variables, they can be easily viewed in the Elastic Beanstalk console, retrieved via API calls, and are often exposed in application logs or configuration files, making them vulnerable to unauthorized access. This method lacks robust encryption and access control mechanisms suitable for secrets management.

  • Store credentials in an Amazon S3 bucket with public read access.

    Why it's wrong here

    Storing credentials in an Amazon S3 bucket with public read access is an extremely dangerous security misconfiguration. Public read access means anyone on the internet can retrieve these credentials without any authentication or authorization, leading to an immediate and severe data breach. This completely negates any security and exposes sensitive information to the entire world, making it an unacceptable practice for any production environment.

  • Store credentials in AWS Secrets Manager and retrieve them at runtime.

    Why this is correct

    AWS Secrets Manager is the recommended and most secure service for storing and managing sensitive credentials. It encrypts secrets at rest and in transit, allows for automatic rotation of credentials, and provides fine-grained access control through AWS IAM policies, ensuring only authorized applications or services can retrieve them at runtime. This approach minimizes the exposure window and enhances the overall security posture by centralizing secret management.

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

Last reviewed: Jul 4, 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.