feat: my first step function
This commit is contained in:
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"Comment": "A description of my state machine",
|
||||||
|
"StartAt": "ListAccounts",
|
||||||
|
"States": {
|
||||||
|
"ListAccounts": {
|
||||||
|
"Type": "Task",
|
||||||
|
"Parameters": {},
|
||||||
|
"Resource": "arn:aws:states:::aws-sdk:organizations:listAccounts",
|
||||||
|
"OutputPath": "$.Accounts[*].Id",
|
||||||
|
"Next": "Map"
|
||||||
|
},
|
||||||
|
"Map": {
|
||||||
|
"Type": "Map",
|
||||||
|
"ItemProcessor": {
|
||||||
|
"ProcessorConfig": {
|
||||||
|
"Mode": "INLINE"
|
||||||
|
},
|
||||||
|
"StartAt": "Lambda Invoke",
|
||||||
|
"States": {
|
||||||
|
"Lambda Invoke": {
|
||||||
|
"Type": "Task",
|
||||||
|
"Resource": "arn:aws:states:::lambda:invoke",
|
||||||
|
"OutputPath": "$.Payload",
|
||||||
|
"Parameters": {
|
||||||
|
"Payload.$": "$",
|
||||||
|
"FunctionName": "arn:aws:lambda:ap-southeast-1:111122223333:function:xpk-test:$LATEST"
|
||||||
|
},
|
||||||
|
"Retry": [
|
||||||
|
{
|
||||||
|
"ErrorEquals": [
|
||||||
|
"Lambda.ServiceException",
|
||||||
|
"Lambda.AWSLambdaException",
|
||||||
|
"Lambda.SdkClientException",
|
||||||
|
"Lambda.TooManyRequestsException"
|
||||||
|
],
|
||||||
|
"IntervalSeconds": 1,
|
||||||
|
"MaxAttempts": 3,
|
||||||
|
"BackoffRate": 2,
|
||||||
|
"JitterStrategy": "FULL"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"End": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"End": true,
|
||||||
|
"ItemsPath": "$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"QueryLanguage": "JSONPath"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user