Exporting an RDS DB Snapshot from Account A to an S3 Bucket in Account B using a Lambda Function in Account B?

0
  1. I have created an RDS DB in Account A and a system snapshot has been created.
  2. I have created an S3 bucket in Account B. 3.Now, I want to create a Lambda Function in Account B which allows me to export the snapshot(which was created in Account A) to the S3 bucket present in Account B. Is the above scenario possible? If Yes, then what are the necessary permissions that I need to provide?
gefragt vor einem Jahr428 Aufrufe
2 Antworten
1

Hi, why do you need a Lambda to do that? you can just do the copy in CLI command: see https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/copy-data-from-an-s3-bucket-to-another-account-and-region-by-using-the-aws-cli.html

The CLI will run on your laptop even if the 2 buckets are on AWS cloud.

profile pictureAWS
EXPERTE
beantwortet vor einem Jahr
  • Our use case is such that we require it to be exported using lambda and not copy it from one account to another. Let me know if it is possible.

0

Hi.Before exporting snapshot to AccountB's bucket ,it seems that exporting manual snapshot to AccountA's bucket will be needed. You can find out the permmision to copy object between account from here.

https://repost.aws/knowledge-center/lambda-copy-s3-files

BTW, rds has snapshot sharing feature so you may use this.

https://repost.aws/knowledge-center/rds-snapshots-share-account

In addition, you can copy object(snapshot) without Lambda by using s3’s replication feature.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication-walkthrough-2.html

Hope this helps.

profile picture
EXPERTE
beantwortet vor einem Jahr
profile picture
EXPERTE
überprüft vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen