Created
September 8, 2022 05:24
-
-
Save rrevo/adf89ec434c2fc2f57a1aa31d1c5f3b2 to your computer and use it in GitHub Desktop.
AWS Step function sample with a lambda invocation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Comment": "Workflow example with lambda invocation", | |
"StartAt": "Fibonacci generator", | |
"States": { | |
"Fibonacci generator": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::lambda:invoke", | |
"OutputPath": "$.Payload", | |
"Parameters": { | |
"Payload.$": "$", | |
"FunctionName": "arn:aws:lambda:~~:~~:function:~~:$LATEST" | |
}, | |
"Retry": [ | |
{ | |
"ErrorEquals": [ | |
"Lambda.ServiceException", | |
"Lambda.AWSLambdaException", | |
"Lambda.SdkClientException" | |
], | |
"IntervalSeconds": 2, | |
"MaxAttempts": 6, | |
"BackoffRate": 2 | |
} | |
], | |
"Next": "Mapper" | |
}, | |
"Mapper": { | |
"Type": "Map", | |
"End": true, | |
"Iterator": { | |
"StartAt": "Adder", | |
"States": { | |
"Adder": { | |
"Type": "Pass", | |
"End": true, | |
"Parameters": { | |
"added.$": "States.MathAdd($, 7)" | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment