CLF-C02 Security and Compliance Practice Question
A company runs a web application that connects to an Amazon RDS for MySQL database. The security policy requires that the database password be rotated every 30 days. The development team wants a fully managed solution that automatically rotates the password, handles the update in RDS, and provides the application with the latest credentials without any code changes. The application should also continue to work during the rotation process. Which AWS service should the company use to meet these requirements?
⚠ Common exam trap
AWS often tests the distinction between Secrets Manager (for automatic rotation and RDS integration) and Systems Manager Parameter Store (for static configuration or manual rotation), leading candidates to choose Parameter Store because it can store secrets but lacks the automated rotation and RDS-specific update capability required here.
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 choice because it provides a fully managed service for automatic password rotation every 30 days, directly integrates with Amazon RDS for MySQL to update the database credentials, and supplies the latest credentials to the application via the Secrets Manager API without requiring any code changes. The rotation process is designed to ensure application availability by using a staged rotation strategy (e.g., creating a new credential while the old one remains valid) so the application continues to work during the 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 Secrets Manager
Why this is correct
Correct. AWS Secrets Manager is a fully managed service that stores, rotates, and retrieves secrets such as database credentials. It supports automatic rotation with built-in integration for Amazon RDS, Aurora, Redshift, and other services. Secrets Manager can rotate passwords on a schedule and use versioning to ensure that applications continue to work during rotation by serving the current version while a new version is being created.
- ✗
AWS Systems Manager Parameter Store
Why it's wrong here
Incorrect. AWS Systems Manager Parameter Store can store secure strings (e.g., passwords) but does not provide built-in automatic rotation. To rotate secrets, you would need to create a custom AWS Lambda function and manage the rotation logic yourself, which adds complexity and does not meet the requirement for a fully managed, automatic solution.
When this WOULD be correct
Parameter Store would be correct if the requirement was to store a static database password or configuration string, and the application needed to retrieve it without automatic rotation. For example, a company that manually rotates passwords and only needs secure storage and retrieval via AWS Systems Manager.
- ✗
AWS Key Management Service (AWS KMS)
Why it's wrong here
Incorrect. AWS KMS is a service for creating and managing encryption keys. It can encrypt data at rest, but it is not designed to store or rotate database passwords. KMS does not provide the ability to automatically rotate application credentials or update database user passwords.
When this WOULD be correct
A company needs to encrypt data at rest in Amazon S3 using customer-managed keys and wants to automatically rotate the encryption keys annually. AWS KMS would be the correct service for managing and rotating the encryption keys.
- ✗
AWS Identity and Access Management (IAM)
Why it's wrong here
Incorrect. IAM is used to manage access to AWS resources by creating users, groups, roles, and policies. It does not store or rotate database passwords for applications. IAM can grant applications permission to retrieve secrets from Secrets Manager, but it is not the service that manages the secrets themselves.
When this WOULD be correct
A company needs to grant an EC2 instance temporary access to an S3 bucket without storing long-term credentials. IAM roles would be correct because they provide temporary credentials via instance profiles, requiring no manual rotation or code changes.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CLF-C02 exam frequently reuses these exact scenarios with slightly different constraints.
✓AWS Secrets ManagerCorrect answer▾
Why this is correct
Correct. AWS Secrets Manager is a fully managed service that stores, rotates, and retrieves secrets such as database credentials. It supports automatic rotation with built-in integration for Amazon RDS, Aurora, Redshift, and other services. Secrets Manager can rotate passwords on a schedule and use versioning to ensure that applications continue to work during rotation by serving the current version while a new version is being created.
✗AWS Systems Manager Parameter StoreWrong answer — click to see why▾
Why this is wrong here
AWS Systems Manager Parameter Store does not support automatic password rotation for RDS databases. It can store secrets but requires custom logic to rotate and update credentials, which does not meet the requirement for a fully managed, automatic rotation solution.
★ When this WOULD be the correct answer
Parameter Store would be correct if the requirement was to store a static database password or configuration string, and the application needed to retrieve it without automatic rotation. For example, a company that manually rotates passwords and only needs secure storage and retrieval via AWS Systems Manager.
Why candidates choose this
Candidates may confuse Parameter Store's secure storage capability with Secrets Manager's rotation feature, assuming Parameter Store can handle rotation because it can store secrets and integrate with other AWS services.
✗AWS Key Management Service (AWS KMS)Wrong answer — click to see why▾
Why this is wrong here
AWS KMS is a key management service for encryption keys, not for rotating database passwords. It does not provide automatic password rotation or direct integration with RDS for credential updates.
★ When this WOULD be the correct answer
A company needs to encrypt data at rest in Amazon S3 using customer-managed keys and wants to automatically rotate the encryption keys annually. AWS KMS would be the correct service for managing and rotating the encryption keys.
Why candidates choose this
Candidates may confuse 'key rotation' with 'password rotation' and assume KMS can handle both, or they may think KMS is involved because Secrets Manager uses KMS to encrypt secrets.
✗AWS Identity and Access Management (IAM)Wrong answer — click to see why▾
Why this is wrong here
IAM manages permissions for users and services, not database credentials. It cannot automatically rotate or provide RDS database passwords to applications without code changes.
★ When this WOULD be the correct answer
A company needs to grant an EC2 instance temporary access to an S3 bucket without storing long-term credentials. IAM roles would be correct because they provide temporary credentials via instance profiles, requiring no manual rotation or code changes.
Why candidates choose this
Candidates may confuse IAM's role in managing access with credential management, assuming IAM can handle database passwords similarly to how it handles AWS access keys.
Analysis generated from the official CLF-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
About these practice questions
One of 988 original CLF-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
3 more ways this is tested on CLF-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 runs a microservices-based application on Amazon ECS. The application stores database credentials and API keys in plaintext configuration files that are baked into container images. A security audit reveals that this practice violates the company's compliance policy, which mandates that secrets must be stored separately from code, centrally managed, and automatically rotated every 90 days. Which AWS service should the company use to meet these requirements?
medium- A.AWS Key Management Service (AWS KMS)
- B.AWS CloudHSM
- ✓ C.AWS Secrets Manager
- D.AWS Systems Manager Parameter Store
Why C: AWS Secrets Manager is the correct choice because it is designed specifically for storing, managing, and automatically rotating database credentials, API keys, and other secrets throughout their lifecycle. It meets the compliance requirements by storing secrets separately from code, providing a central management console and API, and supporting automatic rotation every 90 days via built-in integration with AWS RDS, Redshift, and DocumentDB, or custom Lambda functions.
Variation 2. A company runs a web application on Amazon EC2 instances behind an Application Load Balancer. The application connects to an Amazon RDS for MySQL database. The database password is currently hardcoded in the application configuration file, and the security team is concerned about the risk of exposure. The company wants to remove the hardcoded credential and instead have the application retrieve the database password securely at runtime. Additionally, the security team requires that the password be automatically rotated every 90 days without any manual intervention or custom scripting. Which AWS service should the company use to meet these requirements?
medium- A.AWS Systems Manager Parameter Store (SecureString parameters)
- B.AWS Key Management Service (AWS KMS)
- ✓ C.AWS Secrets Manager
- D.AWS Identity and Access Management (IAM) roles for Amazon EC2
Why C: AWS Secrets Manager is the correct choice because it is purpose-built for securely storing, retrieving, and automatically rotating database credentials (including RDS for MySQL) without custom code. It supports native, automatic rotation of secrets every 90 days via a built-in Lambda rotation function, meeting the security team's requirement for zero manual intervention. Unlike Parameter Store, Secrets Manager provides automatic rotation out of the box, which is the key differentiator here.
Variation 3. A company uses an Amazon RDS for PostgreSQL database for its production application. The security policy requires that database passwords be rotated automatically every 90 days. The database credentials are currently stored in a configuration file on an Amazon EC2 instance. The company wants a fully managed AWS service that can securely store the credentials, automatically rotate them on a schedule, and update the RDS instance without requiring code changes to the application. Which AWS service should the company 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 a fully managed service designed specifically to securely store database credentials, automatically rotate them on a defined schedule (e.g., every 90 days), and natively integrate with Amazon RDS to update the password without requiring any application code changes. The application can retrieve the current credentials at runtime using the Secrets Manager API, eliminating the need for hardcoded or file-based credentials.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CLF-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 CLF-C02 exam.