A V2 CodePipeline pipeline uses a GitHub source through AWS CodeConnections. It must start only for pushes that change services/payments/** on release/** branches, excluding release/legacy/** branches. Which configuration meets these requirements?
Show the answer
Correct answerB. Configure one push filter with branch inclusion release/**, branch exclusion release/legacy/**, and file-path inclusion services/payments/**.
AWhy not this: BranchName is not a wildcard branch filter; the custom trigger would lack the required branch restrictions.
BWhy this is right: A single push filter combines branch and file-path conditions with AND, while the exclusion removes legacy branches.
CWhy not this: A pull-request CLOSED event is not the required push event and can include closure without a merge.
DWhy not this: Separate push filters use OR logic, allowing unrelated file changes or pushes on unintended branches to start executions.
Within one push filter, branch and file-path conditions must both match, and branch exclusions take precedence over inclusions, so release/legacy/** branches are removed even though release/** matches them. Separate push filters are alternatives, so either matching filter could start the pipeline.