Skip to content

Instantly share code, notes, and snippets.

@hocyadav
Forked from djg07/ASL
Created September 21, 2020 12:28
Show Gist options
  • Save hocyadav/746269ec2527e72583eea5fb8688c117 to your computer and use it in GitHub Desktop.
Save hocyadav/746269ec2527e72583eea5fb8688c117 to your computer and use it in GitHub Desktop.
{
"Comment": "A simple AWS Step Functions state machine that automates a call center support session.",
"StartAt": "ProcessTransaction",
"States": {
"ProcessTransaction": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$.TransactionType",
"StringEquals": "PURCHASE",
"Next": "ProcessPurchase"
},
{
"Variable": "$.TransactionType",
"StringEquals": "REFUND",
"Next": "ProcessRefund"
}
]
},
"ProcessRefund": {
"Type": "Task",
"Resource": "arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME",
"End": true
},
"ProcessPurchase": {
"Type": "Task",
"Resource": "arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME",
"End": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment