Created
June 21, 2018 10:40
-
-
Save koladilip/4d28311e0fff6962dbdc0d92d58610bf to your computer and use it in GitHub Desktop.
State machine definition for step function to export cloudwatch logs to S3 using lambda: https://gist.github.com/koladilip/780643318b5fba48abc026d9992d8e36
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": "Cloudwatch logs to S3 export task", | |
"StartAt": "CreateExportTask", | |
"States": { | |
"CreateExportTask": { | |
"Type": "Task", | |
"Resource": "arn:aws:lambda:eu-west-1:<awws-account-id>:function:CloudwatchLogsToS3Exporter", | |
"Next": "IsAllLogsExported" | |
}, | |
"IsAllLogsExported": { | |
"Type": "Choice", | |
"Choices": [ | |
{ | |
"Variable": "$.continue", | |
"BooleanEquals": true, | |
"Next": "CreateExportTask" | |
} | |
], | |
"Default": "SuccessState" | |
}, | |
"SuccessState": { | |
"Type": "Succeed" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment