Created
June 18, 2021 07:51
-
-
Save aliartiza75/772ee8d4ef3e912695b5684275e08def to your computer and use it in GitHub Desktop.
It contains state machine definition for RDS snapshot creation and migration lambda.
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": "Migrate RDS snapshots for disaster recovery", | |
"StartAt": "MigrateRDSSnapshots", | |
"States": { | |
"MigrateRDSSnapshots": { | |
"Type": "Task", | |
"Resource": "arn:aws:lambda:XX-XXXX-2:XXXXXX:function:migrate-rds-snapshots", | |
"Retry": [ | |
{ | |
"ErrorEquals": [ | |
"Lambda.ServiceException", | |
"Lambda.AWSLambdaException", | |
"Lambda.SdkClientException" | |
], | |
"IntervalSeconds": 2, | |
"MaxAttempts": 6, | |
"BackoffRate": 2 | |
} | |
], | |
"InputPath": "$", | |
"ResultPath": "$", | |
"Comment": "It will create RDS snapshots and migrate(copy) to another region.", | |
"Next": "CheckSnapshotsMigrated" | |
}, | |
"CheckSnapshotsMigrated": { | |
"Type": "Choice", | |
"Choices": [ | |
{ | |
"Variable": "$.MigrationCompleted", | |
"BooleanEquals": false, | |
"Next": "MigrateRDSSnapshots" | |
} | |
], | |
"Default": "Done" | |
}, | |
"Done": { | |
"Type": "Pass", | |
"End": true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment