SAP-C02 Design for New Solutions Practice Question
A startup is building a serverless application using AWS Lambda. They need to securely store and retrieve database credentials without hardcoding them in the function code. Which AWS service should they use?
⚠ Common exam trap
Many candidates confuse AWS Systems Manager Parameter Store with Secrets Manager because both can store secrets, but Parameter Store lacks native automatic rotation and is not designed as a full lifecycle secrets management service, making Secrets Manager the correct answer for database credential rotation requirements.
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 purpose-built for securely storing, rotating, and retrieving database credentials and other secrets throughout their lifecycle. It integrates natively with Lambda via the AWS SDK, allowing retrieval of credentials at runtime without hardcoding, and supports automatic rotation of secrets for supported databases like Amazon RDS.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Amazon DynamoDB
Why it's wrong here
DynamoDB is a NoSQL database, so storing credentials there still requires the function to obtain access credentials for DynamoDB itself, leaving the bootstrap secret problem unsolved. It is tempting because it is a managed store with fine-grained IAM, and would suit application data or session state, not secret retrieval.
- ✓
AWS Secrets Manager
Why this is correct
AWS Secrets Manager stores credentials outside the function code and retrieves them at runtime via IAM-scoped API calls, with built-in rotation. This satisfies the no-hardcoding constraint by removing static credentials from Lambda deployment packages and environment variables.
- ✗
AWS Identity and Access Management (IAM)
Why it's wrong here
IAM policies grant permissions to call secretsmanager:GetSecretValue, but IAM itself stores no credential values, so Lambda has nothing to retrieve. It is tempting because IAM roles are how Lambda authenticates to Secrets Manager; IAM would be correct for authorising access, not for holding the database password.
- ✗
AWS Systems Manager Parameter Store
Why it's wrong here
Parameter Store can hold credentials, but plain String parameters are unencrypted; only SecureString uses KMS, and rotation is manual. It is tempting as a cheap configuration store, and would suit non-secret settings such as endpoints or feature flags, yet Secrets Manager provides native automatic rotation for database credentials.
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 SAP-C02 question is part of Courseiva's 984-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 SAP-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 SAP-C02 exam.