DOP-C02 SDLC Automation Practice Question
Which TWO AWS services can be used as sources in an AWS CodePipeline? (Choose two.)
⚠ Common exam trap
Many candidates confuse services that can be used as actions (like Lambda, CodeBuild, or CloudFormation) with services that can be used as sources, leading them to select Lambda or CodeBuild as source options.
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 CodeCommit
AWS CodePipeline supports AWS CodeCommit and Amazon S3 as source stages. CodeCommit is a fully managed source control service that integrates natively with CodePipeline, allowing automatic pipeline execution on code changes. Amazon S3 can serve as a source when you upload a source bundle (e.g., a ZIP file) to an S3 bucket, and CodePipeline can poll the bucket for changes or use S3 event notifications to trigger the pipeline.
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 Lambda
Why it's wrong here
AWS Lambda is a serverless compute service that executes code in response to events, not a persistent repository for storing source code. In AWS CodePipeline, Lambda can be integrated as a custom action (either as an action type in a stage or as part of a pipeline's execution logic), but it is not a natively supported source provider. The pipeline cannot poll Lambda for changes or treat a function's code as a source artifact; you would need a separate source like CodeCommit or S3 to drive the pipeline.
- ✓
AWS CodeCommit
Why this is correct
AWS CodeCommit is a fully managed source control service hosting private Git repositories, making it a first-class source provider in CodePipeline. When you attach a CodeCommit repository as the source stage of a pipeline, the pipeline automatically triggers on new commits to a selected branch, using CloudWatch Events or polling. Because CodeCommit stores versioned source code and supports branches and tags, it serves as a reliable source from which CodePipeline can pull artifacts for subsequent build and deploy stages.
- ✗
AWS CloudFormation
Why it's wrong here
AWS CloudFormation is an Infrastructure as Code service that provisions and updates AWS resources using templates, not a place where source code resides. In CodePipeline, CloudFormation actions appear in the Deploy stage as Create/Update Stack or Execute Change Set, consuming artifacts produced upstream rather than initiating the pipeline. Since a source action must identify a location for the pipeline to watch for changes, CloudFormation's deployment-oriented nature makes it ineligible as a source provider.
- ✓
Amazon S3
Why this is correct
Amazon S3 is an object storage service and one of the built-in source providers for CodePipeline, alongside CodeCommit and others. A pipeline can watch a specific S3 bucket and object key (or prefix) for new versions, which is ideal for integrating with code stored outside AWS or for pre-packaged deployment artifacts. Whenever you upload a new object version that matches the configured criteria, S3 triggers the pipeline, either through polling or lambda/event notifications.
- ✗
AWS CodeBuild
Why it's wrong here
AWS CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces build artifacts, but it is not a source repository. In CodePipeline, CodeBuild is configured as a Build action, placed in a Build stage after the Source stage, where it consumes artifacts fetched by a source provider like CodeCommit or S3. CodeBuild itself doesn't store versioned source data or emit change events that CodePipeline could listen to, so it cannot serve as a source.
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 DOP-C02 question is part of Courseiva's 1,298-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 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.