1 Answer
- Newest
- Most votes
- Most comments
1
To achieve disaster recovery actions such as taking a cluster snapshot of your RDS cluster and uploading it to a DR region using the CDK, you'll need to use the CDK to set up infrastructure that can perform these tasks, as CDK itself is designed for resource provisioning, not direct resource manipulation. The approach involves creating a Lambda function with CDK that uses the AWS SDK to interact with AWS services, executing the snapshot creation and copying process.
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
Do you mean that you want to use CDK to copy snapshots instead of restoring from them? If so, why not use AWS Backup resources? https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_backup-readme.html
If you use AWS SDK instead of CDK, you can execute APIs such as creating an RDS snapshot and then copying it to another region. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/rds/client/create_db_cluster_snapshot.html https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/rds/client/copy_db_cluster_snapshot.html