Skip to content

Instantly share code, notes, and snippets.

@GMKBabu
Forked from djg07/ASL
Created November 6, 2019 08:32
Show Gist options
  • Save GMKBabu/a00a299fff056c368425fa192f3bf36e to your computer and use it in GitHub Desktop.
Save GMKBabu/a00a299fff056c368425fa192f3bf36e 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