Skip to content

Instantly share code, notes, and snippets.

@djg07
Created October 26, 2019 15:21
Show Gist options
  • Save djg07/76e30825dbb56cd187d02649a8b49208 to your computer and use it in GitHub Desktop.
Save djg07/76e30825dbb56cd187d02649a8b49208 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"
}
@mahendrads
Copy link

Thanks for sharing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment