Skip to content

Instantly share code, notes, and snippets.

@hocyadav
Forked from djg07/SQSStepFunction.json
Created September 21, 2020 12:28
Show Gist options
  • Save hocyadav/8e0e2c2442d042a37474892a8b27e34a to your computer and use it in GitHub Desktop.
Save hocyadav/8e0e2c2442d042a37474892a8b27e34a to your computer and use it in GitHub Desktop.
{
"Comment":"Transaction Processor State Machine Using SQS",
"StartAt":"ProcessTransaction",
"States":{
"ProcessTransaction":{
"Type":"Pass",
"Next":"BroadcastToSqs"
},
"BroadcastToSqs":{
"Type":"Task",
"Resource":"arn:aws:states:::sqs:sendMessage",
"Parameters":{
"QueueUrl":"",
"MessageBody":{
"TransactionId.$":"$.TransactionId",
"Type.$":"$.Type"
}
},
"End":true
}
}
}
Input
---
{
"TransactionId": "abc",
"Type": "PURCHASE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment