Courseiva
Question 988 of 724
SecurityhardMultiple ChoiceObjective-mapped

DVA-C02 Security Practice Question

A developer is using AWS Secrets Manager to rotate database credentials automatically. The rotation fails with the error 'The secret value is not valid JSON.' What is the most likely cause?

⚠ Common exam trap

A common mix-up: candidates confuse the JSON validation error with other rotation failures, such as network issues or permission errors, but the specific error message 'The secret value is not valid JSON' directly points to the secret's format being incorrect.

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 secret value was stored as a plain string instead of a JSON object.

AWS Secrets Manager requires secret values to be stored as valid JSON objects when automatic rotation is configured. If the secret is stored as a plain string (e.g., a single password string without key-value pairs), the rotation function cannot parse it, resulting in the 'The secret value is not valid JSON' error. This is because the Lambda rotation function expects to read and write a JSON structure to manage the credentials during rotation.

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 secret is in a different AWS region than the Lambda rotation function.

    Why it's wrong here

    Cross-region rotation for AWS Secrets Manager is indeed supported, provided the Lambda rotation function is configured with the necessary IAM permissions to access Secrets Manager in the target region. The Lambda function must also explicitly target the correct regional endpoint for Secrets Manager when making API calls, rather than relying on the default endpoint of its own region. Therefore, a secret being in a different region does not inherently prevent rotation if the setup is correctly implemented.

  • The secret value was stored as a plain string instead of a JSON object.

    Why this is correct

    AWS Secrets Manager automatic rotation functions, typically implemented as Lambda functions, are designed to parse specific key-value pairs from the secret string to perform database credential updates. When a secret value is stored as a plain string, such as 'myPassword123', the Lambda function cannot extract required components like 'username', 'password', 'host', or 'port' because the expected JSON structure is absent. This lack of structured data prevents the rotation function from successfully connecting to the database and updating the credentials, leading to a rotation failure.

  • The secret name is not base64-encoded.

    Why it's wrong here

    Secret names in AWS Secrets Manager are simply user-defined string identifiers used to uniquely identify and retrieve a secret. They are not part of the secret's actual value that the rotation function parses for database credentials, nor are they subject to any base64 encoding requirements for their own identification or retrieval. Base64 encoding is typically used for binary data or to safely transmit text over systems that may not handle all characters, which is irrelevant for a secret's descriptive name.

  • The secret does not have the correct version label.

    Why it's wrong here

    AWS Secrets Manager uses version labels like `AWSCURRENT`, `AWSPENDING`, and `AWSPREVIOUS` to manage the lifecycle of secret versions during the rotation process, indicating the current, new, and previous active secrets respectively. While these labels are critical for the rotation function to track and transition secret versions, they are metadata managed by Secrets Manager and the rotation function itself, not part of the secret's internal value format. An 'incorrect' version label would indicate a state management issue, not a fundamental problem with parsing the secret's JSON content.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

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: 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.