Created
February 19, 2023 06:47
-
-
Save imewish/7924bc329c29d5a8c5f4dd6e58aad696 to your computer and use it in GitHub Desktop.
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
stateMachines: | |
RunLambdaEveryXsecond: | |
events: | |
- schedule: | |
rate: rate(1 minute) | |
enabled: false | |
input: | |
counter: 0 | |
name: RunLambdaEveryXsecond | |
definition: | |
Comment: A description of my state machine | |
StartAt: Pass | |
States: | |
Pass: | |
Type: Pass | |
Next: Choice | |
Parameters: | |
counter.$: States.MathAdd($.counter, 1) | |
Choice: | |
Type: Choice | |
Choices: | |
- Variable: $.counter | |
NumericLessThanEquals: 6 | |
Next: Lambda Invoke | |
Default: Pass (1) | |
Lambda Invoke: | |
Type: Task | |
Resource: arn:aws:states:::lambda:invoke | |
Parameters: | |
FunctionName: >- | |
arn:aws:lambda:${aws:region}:${aws:accountId}:function:ur-function-name:$LATEST | |
InvocationType: Event | |
Retry: | |
- ErrorEquals: | |
- Lambda.ServiceException | |
- Lambda.AWSLambdaException | |
- Lambda.SdkClientException | |
- Lambda.TooManyRequestsException | |
IntervalSeconds: 2 | |
MaxAttempts: 6 | |
BackoffRate: 2 | |
Next: Wait | |
ResultPath: null | |
Wait: | |
Type: Wait | |
Seconds: 10 | |
Next: Pass | |
Pass (1): | |
Type: Pass | |
End: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment