Michael Lloyd Lee mlk
Michael Lloyd Lee mlk

Reputation: 14661

How do I automate cross-region copying of encrypted RDS snapshots in AWS?

Doing so in the UI is very easy, just select the region and click go. Looking at the documentation, it appears I need to create a pre-signed URL. However I don't see the options in the API to create this.

I’d like to do this via a Javascript AWS Lambda.

I can do this via the command line like so:

$  aws rds copy-db-snapshot   --source-db-snapshot-identifier arn:aws:rds:eu-west-1:XXXX:snapshot:XXX-2017-01-31-04-30      --target-db-snapshot-identifier mydbsnapshotcopy   --kms-key-id XXX --region eu-central-1 --source-region eu-west-1

However the JavaScript APIs don't support a SourceRegion.

Upvotes: 1

Views: 1134

Answers (1)

Mark B
Mark B

Reputation: 200860

As it clearly states in the documentation you linked, you only need to create a pre-signed URL if you are not specifying a source region. So just specify a source region.

--source-region — The AWS region that the encrypted DB snapshot will be copied from. If source-region is not specified, you must specify a pre-signed-url. A pre-signed-url is a URL that contains a Signature Version 4 signed request for the CopyDBSnapshot action to be called in the source region where the DB snapshot will be copied from. To learn more about the pre-signed-url, see CopyDBSnapshot.

Upvotes: 1

Related Questions