This is a python program which creates the snapshot of an RDS cluster present in one AWS account and restores it in another AWS account. This is developed in python using the package boto3. This script takes care of the following activities

  • Create snapshot of the the RDS cluster in the source AWS account
  • Share the snapshot with the destination AWS account
  • Restore the RDS cluster from the snapshot in the destination AWS account
  • Provision DB instances in the cluster

The complete program is given below. Please read the comments in the code. You can make the required changes in the code based on your use case. This logic can be used inside a Lambda function to schedule the copy operation regularly. You can directly read this program from my GitHub account if the below code is not readable.

I hope this example is helpful. Feel free to comment if you have any questions or feedback.