Question 424 of 1,616
SecuritymediumMultiple SelectObjective-mapped

Quick Answer

The answer is AWS Secrets Manager and AWS Lambda. Secrets Manager is the correct service because it is purpose-built for securely storing, retrieving, and automatically rotating database credentials, and it integrates natively with Lambda to perform the rotation logic via a scheduled rotation function. On the AWS Certified Developer Associate DVA-C02 exam, this pairing tests your understanding of how to automate credential lifecycle management without hardcoding secrets or managing rotation schedules manually. A common trap is choosing AWS Systems Manager Parameter Store, which can store secrets but lacks built-in automatic rotation; Secrets Manager’s rotation feature is the key differentiator. To remember this, think of the mnemonic “Secrets Rotate with Lambda” — Secrets Manager handles the storage and rotation policy, while Lambda executes the actual credential update against the database.

DVA-C02 Security Practice Question

This DVA-C02 practice question tests your understanding of security. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. 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 wants to securely store database credentials for a Lambda function. The credentials must be automatically rotated. Which TWO services should be used together?

Question 1mediummulti select
Full question →

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

AWS Secrets Manager

AWS Secrets Manager is the correct service because it is purpose-built for securely storing, retrieving, and automatically rotating database credentials and other secrets. It integrates natively with AWS Lambda and supports automatic rotation via a built-in rotation function or a custom Lambda function, meeting the requirement for automated credential rotation without manual intervention.

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.

  • AWS KMS

    Why it's wrong here

    Encryption only.

  • AWS Secrets Manager

    Why this is correct

    Stores and rotates secrets.

    Related concept

    Read the scenario before looking for a memorised answer.

  • AWS CloudHSM

    Why it's wrong here

    Not for secret rotation.

  • AWS Lambda

    Why this is correct

    Can be used to implement custom rotation logic.

    Related concept

    Read the scenario before looking for a memorised answer.

  • AWS Systems Manager Parameter Store

    Why it's wrong here

    Does not support automatic rotation.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse AWS Systems Manager Parameter Store with Secrets Manager because both can store secrets, but Parameter Store lacks automatic rotation, which is explicitly required in the question.

Detailed technical explanation

How to think about this question

AWS Secrets Manager uses a rotation schedule defined by a cron expression and invokes a Lambda function (either a provided template or custom) to rotate the secret, updating the database password and the secret value atomically. Under the hood, Secrets Manager integrates with AWS KMS for envelope encryption, where a KMS key encrypts the secret data, and the service manages versioning (AWSCURRENT, AWSPREVIOUS) to support rotation without downtime. In a real-world scenario, a Lambda function can retrieve the current secret using the AWS SDK with minimal latency, and automatic rotation ensures compliance with security policies like PCI DSS or SOC 2.

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?

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

What is the correct answer to this question?

The correct answer is: AWS Secrets Manager — AWS Secrets Manager is the correct service because it is purpose-built for securely storing, retrieving, and automatically rotating database credentials and other secrets. It integrates natively with AWS Lambda and supports automatic rotation via a built-in rotation function or a custom Lambda function, meeting the requirement for automated credential rotation without manual intervention.

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.

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

3 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 Secrets Manager to rotate database credentials for an RDS MySQL instance. The rotation Lambda function fails with the error: 'Secret is scheduled for deletion.' What is the MOST likely cause?

hard
  • A.The secret has been marked for deletion and is in the waiting period.
  • B.The secret's rotation schedule has been disabled.
  • C.The Lambda function does not have permission to access the secret.
  • D.The RDS instance is not in the same VPC as the Lambda function.

Why A: The error 'Secret is scheduled for deletion' indicates that the secret has been marked for deletion and is currently in the mandatory waiting period (default 7 to 30 days). During this period, AWS Secrets Manager prevents any operations on the secret, including rotation, to ensure the deletion is intentional. The rotation Lambda function fails because it cannot access or modify a secret that is pending deletion.

Variation 2. A company uses AWS Secrets Manager to rotate database credentials. The rotation process uses a Lambda function that updates the secret. The developer notices that the rotation sometimes fails because the Lambda function does not have permission to update the secret. What is the MOST likely cause?

medium
  • A.The secret has a resource-based policy that denies the Lambda function.
  • B.The Lambda function's execution role does not have the necessary IAM permissions to update the secret.
  • C.The KMS key used to encrypt the secret is not accessible by the Lambda function.
  • D.The Lambda function is not in the same VPC as the Secrets Manager endpoint.

Why B: Option C is correct because the Lambda function's execution role needs permissions to update the secret. Option A is wrong because rotation does not require VPC endpoints. Option B is wrong because the secret itself does not have a resource policy blocking access. Option D is wrong because KMS key permissions are for encryption, not secret update.

Variation 3. A company wants to store database credentials securely and rotate them automatically on a schedule. The credentials are used by an AWS Lambda function to access an Amazon RDS instance. Which AWS service should the developer use to meet these requirements?

medium
  • A.AWS Secrets Manager
  • B.AWS Systems Manager Parameter Store
  • C.AWS Key Management Service (KMS)
  • D.AWS Certificate Manager (ACM)

Why A: AWS Secrets Manager is the correct choice because it is specifically designed to securely store, retrieve, and automatically rotate database credentials on a schedule. It natively supports automatic rotation for Amazon RDS databases (including MySQL, PostgreSQL, Oracle, SQL Server, and MariaDB) by integrating with Lambda to update the credentials in both Secrets Manager and the RDS instance. This meets the requirement for both secure storage and scheduled rotation without custom infrastructure.

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.