1 個回答
- 最新
- 最多得票
- 最多評論
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.
相關內容
- AWS 官方已更新 2 年前
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