-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsfn_template.tftpl
45 lines (45 loc) · 1.16 KB
/
sfn_template.tftpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"Comment": "GSuite channel renewer step function",
"StartAt": "Wait for Expiration",
"States": {
"Wait for Expiration": {
"Type": "Wait",
"Next": "Invoke Renewer Function",
"TimestampPath": "$.expiration"
},
"Invoke Renewer Function": {
"Type": "Task",
"Resource": "arn:aws:states:::lambda:invoke",
"OutputPath": "$.Payload",
"Parameters": {
"Payload.$": "$",
"FunctionName": "${function_arn}"
},
"Retry": [
{
"ErrorEquals": [
"Lambda.ServiceException",
"Lambda.AWSLambdaException",
"Lambda.SdkClientException",
"Lambda.Unknown",
"Lambda.TooManyRequestsException"
],
"IntervalSeconds": 2,
"MaxAttempts": 6,
"BackoffRate": 2
}
],
"Next": "Start SFN"
},
"Start SFN": {
"Type": "Task",
"Resource": "arn:aws:states:::states:startExecution",
"Parameters": {
"StateMachineArn": "${state_machine_arn}",
"Input.$": "$",
"Name.$": "States.Format('{}_{}', $.application, $.channel_id)"
},
"End": true
}
}
}