Courseiva
SDLC Automation →easyMultiple Select

DOP-C02 SDLC Automation Practice Question

Which TWO AWS services can be used as source actions in AWS CodePipeline to automatically trigger a pipeline when changes are made? (Choose two.)

⚠ Common exam trap

Watch out — candidates often confuse Amazon CloudWatch (a monitoring service) with Amazon EventBridge (the event bus service that actually triggers pipelines), or they think EC2 can be a source because it can run scripts that poll for changes, but CodePipeline source actions require native event-driven integration, not custom polling.

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

✓

Amazon S3

Amazon S3 is a valid source action in AWS CodePipeline because you can configure a pipeline to start when a new object is created or an existing object is updated in an S3 bucket. This is achieved by enabling Amazon S3 event notifications (via Amazon S3 Event Notifications) that send events to Amazon CloudWatch Events or directly to AWS CodePipeline using a CloudWatch Events rule, which then triggers the pipeline execution. This allows automatic pipeline runs on code or artifact changes stored in S3.

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 CloudWatch

    Why it's wrong here

    Amazon CloudWatch is a monitoring and event streaming service, not a versioned artifact repository. Although an EventBridge rule can start a CodePipeline execution in response to events, the pipeline's Source stage still requires a supported repository like S3, CodeCommit, or ECR to produce the source artifact and its revision metadata. CloudWatch events do not supply file content or revision identifiers, so it cannot be a Source action.

  • ✓

    Amazon S3

    Why this is correct

    Amazon S3 is a supported CodePipeline Source action that detects new uploads when versioning is enabled, either through CloudWatch Events or periodic polling. When a new object version is written to the designated bucket and key, CodePipeline starts a pipeline execution and downloads that object as the input artifact for downstream stages. This makes S3 a common choice for external tooling or third-party providers to drop build artifacts.

  • ✗

    Amazon EC2

    Why it's wrong here

    Amazon EC2 provides virtual machines and is commonly used as a deployment target, not as a pipeline source. A Source action in CodePipeline must expose a distinct artifact revision (e.g., an object key or commit ID) and allow CodePipeline to fetch the contents; an ephemeral EC2 instance has no inherent source artifact store or versioning semantics. It cannot supply code to the pipeline because it is not a repository service.

  • ✗

    AWS CloudFormation

    Why it's wrong here

    AWS CloudFormation is used in CodePipeline as a deployment provider via the Create or Update Stack action, where it provisions or updates infrastructure based on a template that already exists in a source artifact. It does not act as a Source action because it does not host or version the code and configuration files that feed the pipeline; rather, it consumes artifacts produced earlier in the pipeline. Its role is infrastructure provisioning, not origin storage.

  • ✓

    AWS CodeCommit

    Why this is correct

    AWS CodeCommit is a fully managed Git repository that is natively supported as a CodePipeline Source action. When you configure a CodeCommit repository and branch as a source, CodePipeline automatically starts a pipeline execution on push events (or polls periodically), clones the repository, and packages the contents into a source artifact for downstream build and deploy stages. It provides commit IDs as revision identifiers for tracking.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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 →

How Courseiva writes practice questions · Editorial policy

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.