DOP-C02 Configuration Management and IaC Practice Question
A company uses AWS CodeBuild to build and test code. They need to securely store sensitive parameters, such as database passwords, and inject them into the build process. Which AWS service should they use?
⚠ Common exam trap
It's easy for candidates to confuse AWS Secrets Manager with Systems Manager Parameter Store, but the exam expects you to know that Parameter Store is the simpler, more cost-effective choice for injecting static or semi-static configuration values into CodeBuild, while Secrets Manager is intended for secrets requiring 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 Systems Manager Parameter Store
AWS Systems Manager Parameter Store is the correct choice because it provides secure, hierarchical storage for configuration data and secrets, such as database passwords, and integrates natively with AWS CodeBuild via the `parameter-store` environment variable type. This allows you to reference parameters without hardcoding sensitive values, and you can optionally use secure string parameters encrypted with KMS for additional protection.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Storing them in the CodeBuild project environment variables
Why it's wrong here
Storing secrets as plaintext environment variables in a CodeBuild project is insecure because any principal with codebuild:BatchGetProjects or console access can read them, and they may appear in build logs or CloudTrail. CodeBuild does not encrypt environment variable values at rest by default, and they lack the access governance and audit capabilities of a dedicated parameter store.
- ✗
AWS Secrets Manager
Why it's wrong here
AWS Secrets Manager supports automatic rotation of secrets, but CodeBuild natively integrates with AWS Systems Manager Parameter Store for secure parameter injection without requiring additional SDK calls or secret rotation overhead. The scenario only needs static parameter storage and retrieval during builds, not lifecycle management. Secrets Manager is tempting because it securely stores database passwords and other credentials, and would be correct if the requirement included automated secret rotation or cross-account access policies.
- ✗
AWS Key Management Service (KMS)
Why it's wrong here
AWS KMS is not a storage service for parameters or secrets; it only manages customer master keys (CMKs) used to encrypt and decrypt data. While KMS can encrypt a SecureString parameter in Parameter Store or a secret in Secrets Manager, CodeBuild cannot directly fetch a secret value from KMS—it must integrate with a callable secrets service, making KMS alone inappropriate for this scenario.
- ✓
AWS Systems Manager Parameter Store
Why this is correct
AWS Systems Manager Parameter Store is the correct choice because it securely stores configuration data and secrets as parameters, supports typed values including SecureString using KMS encryption, and CodeBuild has native integration by allowing environment variables to reference parameter names and fetch values at build time. It is ideal for static parameters because it imposes no rotation overhead, and you only need to grant the build project's IAM role ssm:GetParameter(s) permission.
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
One of 251 original DOP-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-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 DOP-C02 exam.