DVA-C02 Security Practice Question
A developer runs an application on Amazon EC2 that needs to securely store database credentials (username and password). The security team requires that the credentials be automatically rotated every 30 days. Which AWS service should the developer use to store and automatically rotate the credentials?
⚠ Common exam trap
Watch out — candidates often confuse Parameter Store's SecureString (which can store encrypted secrets but lacks built-in rotation) with Secrets Manager, overlooking the explicit requirement for automatic 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
✓
AWS Secrets Manager with automatic rotation enabled.
AWS Secrets Manager is designed specifically for managing secrets such as database credentials, with built-in capabilities for automatic rotation according to a schedule (e.g., every 30 days). It integrates natively with supported databases (e.g., Amazon RDS, Redshift, DocumentDB) to rotate credentials without custom code, and it encrypts secrets at rest using AWS KMS. This makes it the correct choice for the developer's requirement of secure storage and automated 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.
- ✗
AWS Systems Manager Parameter Store with a SecureString parameter.
Why it's wrong here
AWS Systems Manager Parameter Store with a SecureString parameter can securely store sensitive data by encrypting it with AWS Key Management Service (KMS). However, it does not offer native, built-in automatic rotation capabilities for the stored parameters. Implementing credential rotation would necessitate developing and maintaining custom AWS Lambda functions to periodically update the SecureString parameter, which adds significant operational complexity and management overhead compared to a dedicated secret management service.
- ✓
AWS Secrets Manager with automatic rotation enabled.
Why this is correct
AWS Secrets Manager is purpose-built for managing, retrieving, and rotating database credentials, API keys, and other secrets throughout their lifecycle. Its key differentiator is native automatic rotation, which can be configured on a schedule (e.g., every 30 days) for various supported services, including Amazon RDS, Redshift, and even custom secrets via Lambda functions. This built-in capability eliminates the need for manual rotation or custom code, significantly enhancing security posture and operational efficiency.
- ✗
AWS Identity and Access Management (IAM) roles for EC2.
Why it's wrong here
AWS Identity and Access Management (IAM) roles provide temporary, short-lived credentials that an EC2 instance can assume to make authorized AWS API calls to other AWS services, such as S3 or DynamoDB. While crucial for secure access within the AWS ecosystem, IAM roles are not designed to store or manage external database usernames and passwords. They do not offer any mechanism for storing these specific types of credentials, nor do they provide automatic rotation capabilities for them.
- ✗
AWS Key Management Service (KMS) to store the credentials as encrypted data.
Why it's wrong here
AWS Key Management Service (KMS) is a managed service for creating and controlling encryption keys used to encrypt data. While KMS is fundamental for encrypting secrets at rest, it is not a secret storage service itself; it only manages the cryptographic keys. Storing credentials directly in KMS is not its intended purpose, and it provides no features for secret retrieval, versioning, or, critically, automatic rotation of the actual secret values. A separate secret management service is required to leverage KMS for encryption while providing these essential functionalities.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
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.