Requirement Summary:
Trigger anAWS Step Functions state machine(test execution)
Only when aspecific AWS CloudFormation stack is deployed
Option A: Create a Lambda function to invoke the state machine
✅Valid approach: Lambda can be used as anintermediary triggerfor Step Functions using the SDK (e.g., StartExecution API).
Offers flexibility (custom filtering, additional logic).
Option B: Create EventBridge rule filtering on UPDATE_IN_PROGRESS
❌Incorrect: UPDATE_IN_PROGRESS triggersbeforethe stack is fully deployed.
You need totrigger after deployment, such as UPDATE_COMPLETE or CREATE_COMPLETE.
Option C: EventBridge Pipes with Lambda target filtering on UPDATE_IN_PROGRESS
❌Incorrect for same reason as B (wrong timing).
Also, EventBridge Pipes are not necessary here if you're using rules directly.
Option D: Pipe with EventBridge Rule as source and Step Functions as target
❌Invalid setup: EventBridge Pipes useevent sources, not rules, as input.
This configuration is unsupported.
Option E: Add the state machine as a target of the EventBridge rule
✅Direct and low-overhead approach.
EventBridgenatively supports Step Functionsas a target.
You can trigger the state machinewithout a Lambdaif the filter matches (e.g., ResourceStatus = CREATE_COMPLETE, with the correct StackId).
Step Functions as EventBridge target:https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-target-step-functions.html
EventBridge CloudFormation events:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-listing-event-history.html
StartExecution API:https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html
Submit