I am new in amazon web Services. How to copy RDS Snapshot one region to another Region using aws-sdk-api java programmatic.
Asked
Active
Viewed 441 times
1 Answers
1
You need to make sure to create the AmazonRDSClient
in a specific region and when you create the CopyDBSnapshotRequest
you refer to the snapshot with the full identifier.
Here some pseudo code to copy from us-east zone to eu_central zone
AmazonRDSClient rdsClient = new AmazonRDSClient(/*add your credentials and the proper constructor overload*/);
rdsClient.setRegion(Region.getRegion(Regions.EU_CENTRAL_1));
CopyDBSnapshotRequest copySnapshot = new CopyDBSnapshotRequest();
copySnapshot.setSourceDBSnapshotIdentifier("arn:aws:rds:us-east-1:123456789012:snapshot:mysql-instance1-snapshot-20130805");
copySnapshot.setTargetDBSnapshotIdentifier("mysql-instance1-snapshot-20130805-copy");
DBSnapshot dbSnapshot = rdsClient.copyDBSnapshot(copySnapshot);
Make sure to review Java API for RDS and Copying a DB Snapshot to Another Region

Frederic Henri
- 51,761
- 10
- 113
- 139
-
Thanks Henri , i got solution in aws java RDS API – Sri Ram Oct 06 '15 at 13:28
-
Excellent .. Glad to help – Frederic Henri Oct 06 '15 at 13:50