To implement a 'GitOps' workflow for a serverless application, you want a specific AWS CodeCommit branch to automatically trigger a CodePipeline only when a file matching the pattern 'infra/*.yml' is modified. How can you implement this filtering logic?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Use an Amazon EventBridge rule with a custom 'detail' filter for the specific commit patterns

EventBridge provides the most granular level of event filtering for CodeCommit events, allowing you to trigger pipelines based on commit details....

📋Part of AWS Certified DevOps Engineer – Professional (DOP-C02) · AWS Certification Practice
Real Exam ScenarioScenario Based

To implement a 'GitOps' workflow for a serverless application, you want a specific AWS CodeCommit branch to automatically trigger a CodePipeline only when a file matching the pattern 'infra/*.yml' is modified. How can you implement this filtering logic?

✓ Correct Answer & ExplanationScenario Based

Correct Answer

Use an Amazon EventBridge rule with a custom 'detail' filter for the specific commit patterns

Why This Answer Is Correct

EventBridge provides the most granular level of event filtering for CodeCommit events, allowing you to trigger pipelines based on commit details.

📚 What This Question Tests

This question evaluates your knowledge of Scenario Based — a core concept tested in AWS Certified DevOps Engineer – Professional (DOP-C02). Understanding Scenario Based is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.