AWS Lambda to Amazon EventBridge to AWS Step Functions

AWS Lambda → Amazon EventBridge → AWS Step Functions

Create a Lambda function that sends events to EventBridge with routing to Step Functions.

The SAM template contains all the information to deploy AWS resources(the Lambda functions, the EventBridge and the Step Functions workflow) and also the permission required by these service to communicate.
The OrderPublisher Lambda function will be invoked with a JSON payload which will send the message to the EventBridge custom event bus. The event will match a custom event pattern rule which will send the event to the Step Functions workflow. The workflow will start and invoke the OrderState Lambda function which will return a message and display the EventBridge message in CloudWatch Logs.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-eventbridge-stepfunctions-sam-java

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Razvan Minciuna

Razvan Minciuna

Software Architect.

Follow on LinkedIn