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

0

Is it possible to export an RDS DB Snapshot from Account A to an S3 Bucket in Account B using a Lambda Function in Account B?

gefragt vor einem Jahr501 Aufrufe
2 Antworten
0

Hi,

One option would be to create a policy for the execution role of your AWS Lambda function that allows access to a role in account B. That role should in turn allow access to the resource, in this case the S3 bucket. You can find more information in this article: https://repost.aws/knowledge-center/cross-account-access-s3

profile pictureAWS
EXPERTE
beantwortet vor einem Jahr
  • I'll explain in more detail:

    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?
  • Hi, the above still applies. The difference is in this case that you give permissions to the AWS Lambda function in account B to access a role in account A. That role in account A then gives access to RDS.

    However, you could just copy the snapshot manually via the CLI, 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

0

A better way to answer this question would be to understand you end goal and requirement.

Do you just require a copy of the RDS instance to be available in a different account? If so, have you thought about using AWS Backup?

profile picture
EXPERTE
beantwortet 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