How to trigger AWS CodePipeline on source code changes?
Short answer
AC Store the source code in an Amazon S3 bucket. Configure AWS CodePipeline to start whenever a file in the bucket changes. Store the source code in an AWS CodeCommit repository. Configure AWS CodePipeline to start whenever a change is committed to the repository.
Question
Key Takeaways
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.
Common mistake: 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.
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
https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
This link opens the official vendor documentation in a new tab.
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.
Community Votes
100% of anonymous learners picked answer AC. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
wh1t4k3r 👍 1https://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.
-
tullio85 👍 1both A and C are correct
-
Saudis 👍 1Answer is AC
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →