DVA-C02 · Question #626
DVA-C02 Question #626: Real Exam Question with Answer & Explanation
The correct answer is A: Create an AWS Lambda function to invoke the state machine.. Options A and E together form the correct event-driven pattern: CloudFormation publishes stack lifecycle events to the default EventBridge event bus, so you create an EventBridge rule (implied as part of this solution) that matches on the CloudFormation "Stack Status Change" deta
Question
A company is creating an AWS Step Functions state machine to run a set of tests for an application. The tests need to run when a specific AWS Cloud Formation stack is deployed. Which combination of steps will meet these requirements? (Choose two.)
Options
- ACreate an AWS Lambda function to invoke the state machine.
- BCreate an Amazon EventBridge rule on the default bus that matches on a detail type of
- CCreate a pipe in Amazon EventBridge Pipes that has a source of the default event bus. Set the
- DCreate a pipe in Amazon EventBridge Pipes that has a source of the EventBridge rule. Set the
- EAdd the state machine as a target of the EventBridge rule.
Explanation
Options A and E together form the correct event-driven pattern: CloudFormation publishes stack lifecycle events to the default EventBridge event bus, so you create an EventBridge rule (implied as part of this solution) that matches on the CloudFormation "Stack Status Change" detail type - then add the Step Functions state machine directly as a target of that rule (E), which EventBridge natively supports. A Lambda function (A) acts as an intermediary when you need to transform the raw CloudFormation event payload into the specific input format your state machine expects, which is a common real-world requirement.
Why the distractors are wrong:
- B is incomplete on its own - a rule alone does nothing without a target; E is the missing half.
- C and D both reference EventBridge Pipes, which are designed to connect point-to-point event sources like SQS, DynamoDB Streams, or Kinesis to targets - not for routing events from the default event bus, which EventBridge rules already handle natively. Pipes add unnecessary complexity here.
- D is additionally wrong because EventBridge Pipes cannot use an EventBridge rule as a source; that's a fundamental misunderstanding of Pipes architecture.
Memory tip: Think of it as a two-layer trigger chain - rule detects the event, target consumes it. When you see CloudFormation + Step Functions in an exam question, the answer almost always involves an EventBridge rule (matching CloudFormation Stack Status Change) feeding directly into the state machine, with Lambda as an optional transformation layer in between.
Topics
Community Discussion
No community discussion yet for this question.