How to trigger AWS CodePipeline on source code changes?

A development team wants to immediately build and deploy an application whenever there is a change to the source code. Which approaches could be used to trigger the deployment? (Choose two.)

  1. Store the source code in an Amazon S3 bucket. Configure AWS CodePipeline to start whenever a file in the bucket changes. Source Reference Answer
  2. Store the source code in an encrypted Amazon EBS volume. Configure AWS CodePipeline to start whenever a file in the volume changes.
  3. Store the source code in an AWS CodeCommit repository. Configure AWS CodePipeline to start whenever a change is committed to the repository. Source Reference Answer
  4. Store the source code in an Amazon S3 bucket. Configure AWS CodePipeline to start every 15 minutes.
  5. Store the source code in an Amazon EC2 instance’s ephemeral storage. Configure the instance to start AWS CodePipeline whenever there are changes to the source code.

Community Votes

AC
100%

100% of anonymous learners picked answer AC. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This question tests valid CodePipeline source providers and the distinction between event-based triggers and polling schedules, ensuring the deployment is immediate rather than delayed.

To achieve immediate deployment upon code changes, AWS CodePipeline can be configured to detect changes in Amazon S3 buckets or AWS CodeCommit repositories. The community confirms these are the only valid, event-driven approaches listed in the options.

Selecting Option D is a common mistake because while S3 is a valid source, the 15-minute polling interval violates the requirement for immediate deployment.

Community Discussion (4 comments)

tullio85 👍 1 Selected: AC
both A and C are correct
Saudis 👍 1 Selected: AC
Answer is AC
aragon_saa 👍 1 Selected: AC
Answer is AC
wh1t4k3r 👍 1 Selected: AC
https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#:~:text=When%20you%20create%20a%20pipeline,commit%20a%20source%20code%20change. Only A and C present valid repository types for codepipeline. D also does, but it is not automatic.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Options A and C are correct because Amazon S3 and AWS CodeCommit are supported source providers for AWS CodePipeline that allow for event-based change detection. When a file is uploaded to an S3 bucket or a commit is pushed to a CodeCommit repository, the pipeline can be triggered immediately via CloudWatch Events/EventBridge.

Why the Other Options Are Wrong

Option B is incorrect because Amazon EBS volumes are block storage attached to EC2 instances and are not valid source providers for CodePipeline. Option D is incorrect because polling every 15 minutes does not meet the requirement for immediate deployment. Option E is incorrect because EC2 instance store (ephemeral storage) is not a supported integration source for triggering pipelines automatically in this context.

Community Comment Notes

Community members unanimously agreed on answers A and C, noting that only these options present valid repository types for CodePipeline. One useful comment highlighted that Option D is invalid specifically because it relies on a schedule rather than an automatic trigger.

Official Reference

Exam Strategy

Look for keywords like 'immediate' to identify event-driven triggers over polling mechanisms. Memorize the supported source providers for CodePipeline (S3, CodeCommit, GitHub, Bitbucket) to quickly eliminate invalid storage options like EBS.

Related Analysis

Practice All DVA-C02 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DVA-C02 Practice Test →

← Back to DVA-C02 Study Guide