CLF-C02 Security and Compliance Practice Question
A company runs a web application on Amazon EC2 instances that connect to an Amazon RDS for MySQL database. Currently, the database administrator (DBA) hardcodes the database password in the application configuration file. A recent security audit recommends removing the password from the code and implementing automated password rotation every 30 days. The company wants a managed AWS service that can store the password securely and rotate it on a schedule without requiring custom code. Which AWS service should the company use?
⚠ Common exam trap
Test-takers frequently confuse AWS Systems Manager Parameter Store with Secrets Manager because both can store encrypted strings, but Parameter Store lacks native automated rotation, which is the critical requirement in this 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 choice because it is a managed service specifically designed to securely store database credentials and other secrets, with built-in capability to automatically rotate passwords on a defined schedule (e.g., every 30 days) without requiring custom code. It integrates natively with Amazon RDS for MySQL, enabling automated rotation of the master user password via a pre-built Lambda function, which directly addresses the security audit's requirement to remove hardcoded passwords and implement 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 KMS (Key Management Service)
Why it's wrong here
AWS KMS is a key management service for creating and controlling encryption keys, not a secret store. It can encrypt secrets, but the encrypted ciphertext must be held elsewhere, and KMS itself does not store application passwords or provide scheduled secret rotation. KMS does support automatic rotation of KMS keys, but that rotates the encryption key, not the secret value, so it does not meet the requirement to rotate database credentials without custom code.
When this WOULD be correct
A company needs to encrypt data at rest in Amazon S3 using customer-managed keys and wants to control key rotation. AWS KMS would be the correct service to create, manage, and rotate the encryption keys.
- ✗
AWS Systems Manager Parameter Store
Why it's wrong here
Parameter Store can store secure strings (using KMS encryption), but it does not have native capability to automatically rotate secrets on a schedule. Custom automation (e.g., with Lambda) is required for rotation, which the company wants to avoid.
When this WOULD be correct
A company needs to store configuration data (e.g., database endpoints, AMI IDs) or secrets that do not require automatic rotation, and they want a low-cost, serverless option integrated with AWS Systems Manager for operational tasks.
- ✓
AWS Secrets Manager
Why this is correct
Secrets Manager is designed for securely storing secrets such as database credentials, API keys, and other sensitive data. It offers built-in automatic secret rotation with integration to RDS and other services, meeting the requirement without custom code.
- ✗
AWS IAM (Identity and Access Management)
Why it's wrong here
AWS IAM does not store application secrets such as database passwords; it is an identity and access management service that controls who can access AWS resources through users, groups, roles, and policies. Although IAM roles can issue temporary credentials to EC2 instances via instance profiles, those credentials are for AWS API calls, not for authenticating to a database. IAM has no native mechanism to store a secret value and automatically rotate it on a schedule.
When this WOULD be correct
A company needs to grant EC2 instances access to an S3 bucket without storing access keys on the instances. IAM roles would be the correct answer because they provide temporary credentials via instance profiles.
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
Secrets Manager is designed for securely storing secrets such as database credentials, API keys, and other sensitive data. It offers built-in automatic secret rotation with integration to RDS and other services, meeting the requirement without custom code.
✗AWS KMS (Key Management Service)Wrong answer — click to see why▾
Why this is wrong here
AWS KMS is a key management service for encryption keys, not for storing secrets like database passwords or rotating them on a schedule. It does not provide automated secret rotation.
★ 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 control key rotation. AWS KMS would be the correct service to create, manage, and rotate the encryption keys.
Why candidates choose this
Candidates may confuse KMS with a secret store because both involve encryption and keys, but KMS only manages cryptographic keys, not application secrets like passwords.
✗AWS Systems Manager Parameter StoreWrong answer — click to see why▾
Why this is wrong here
AWS Systems Manager Parameter Store does not support automatic rotation of secrets; it requires custom code or AWS Lambda to implement rotation, whereas the question specifies a managed service that rotates passwords automatically without custom code.
★ When this WOULD be the correct answer
A company needs to store configuration data (e.g., database endpoints, AMI IDs) or secrets that do not require automatic rotation, and they want a low-cost, serverless option integrated with AWS Systems Manager for operational tasks.
Why candidates choose this
Parameter Store can securely store secrets and is often used for configuration management, leading candidates to overlook its lack of built-in rotation capabilities.
✗AWS IAM (Identity and Access Management)Wrong answer — click to see why▾
Why this is wrong here
AWS IAM is for managing users, groups, and permissions, not for storing secrets like database passwords. It cannot store or rotate secrets on a schedule.
★ When this WOULD be the correct answer
A company needs to grant EC2 instances access to an S3 bucket without storing access keys on the instances. IAM roles would be the correct answer because they provide temporary credentials via instance profiles.
Why candidates choose this
Candidates may confuse IAM's role in access control with secret management, thinking IAM can handle passwords since it deals with credentials.
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?”
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
This CLF-C02 question is part of Courseiva's 988-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 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.