CodePipeline structure, stages and triggers: DOP-C02 study notes and practice questions
What to know about CodePipeline structure, stages and triggers for the DOP-C02 exam, from the SDLC Automation domain (22% of the exam guide), then 1 free question to test it. Part of the DOP-C02 study guide.
A logistics company deploys its route-planning service to Amazon ECS from an AWS CodePipeline pipeline. The source is a GitHub monorepo connected through AWS CodeConnections, and the service lives under a services/routing folder beside web frontends and documentation.
Today the pipeline starts on every push to every branch, so feature-branch commits reach the production approval stage and documentation-only commits trigger full deployments. Release managers want a run to start only for pushes to the main branch that change files under services/routing.
The team also wants no custom code to host, patch or debug, and the existing pipeline to remain the single place where production deployments are approved.
Which change meets these requirements with the LEAST operational overhead?
Choose one answer.
AA. Add an Amazon API Gateway endpoint and a Lambda function that receives every GitHub webhook, reads the changed file paths, and calls StartPipelineExecution only for matching pushes to main.
BB. Convert the pipeline to a V2 pipeline, and set a push trigger on the CodeConnections source action with branch filters for main and file path filters for services/routing/**.
CC. Keep the V1 pipeline and add a first CodeBuild stage that diffs the commit and fails when no routing files changed, so the run stops before any deployment starts.
DD. Keep the V1 pipeline unchanged, and have a release engineer review each push to main and start the pipeline by hand from the console when the routing folder has changed.
Show the answer and explanation
Answer: B
A. Wrong: This would work, but the team would write, host and patch a webhook receiver and its filtering logic. The release path gains a moving part for a filter that the pipeline can express natively. Learn more: StartPipelineExecution (opens in a new tab)
D. Wrong: Manual starts depend on someone noticing the change, which causes delays and missed releases. The requirement is for matching pushes to start runs automatically, and this design removes that automation.
Explanation
A V2 pipeline can filter Git pushes by branch and by changed file path, and a CodeConnections source action delivers those events without extra infrastructure. A webhook function, a diff stage or a manual start each adds code or steps the team must run, and the diff stage still records a run for every unrelated commit.
Want more on CodePipeline structure, stages and triggers? The 5 full-length practice sets have 8 more CodePipeline structure, stages and triggers questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →