intuit / Trapheus

This tool automates restoration of RDS database instances from snapshots into any dev, staging or production environments. It supports individual RDS Snapshot as well as cluster snapshot restore operations.
https://intuit.github.io/Trapheus/
MIT License
101 stars 52 forks source link

Issue #68: share snapshot and restore db instance in other AWS accounts and regions #186

Closed namitad closed 7 months ago

namitad commented 8 months ago

Description

incremental PR to support sharing rds snapshot and restore db instance in other AWS accounts and regions. This PR contains the following:

  1. lambda to execute SSM automation (existing one managed by AWS: AWSSupport-ShareRDSSnapshot) which shares rds snapshot to another account
  2. lambda to execute SSM automation (custom created) which executes restoration process for db instance in given account and region from the shared snapshot
  3. updates in template.yaml - cft for iam role for ssm execution, cft for ssm automation document for db restore, cfts for above 2 lambdas functions, updating state machine to include these steps in the pipeline.
  4. install.py updated to have s3 bucket as param since template.yaml size is greater than 51,200 bytes

Thanks for contributing this Pull Request. Make sure that you submit this Pull Request against the master branch of this repository, add a brief description, and tag the relevant issue(s) and PR(s) below.

stationeros commented 8 months ago

Thank you for doing this , this has been a long wishlist item.

Can you put in some more details in the PR description to the functionality of the PR ? How many lambda functions? how does it facilitate backup and restore etc which will help me understand and better review this

stationeros commented 7 months ago

Is there anything pending in this PR or we can merge this ?

namitad commented 7 months ago

@stationeros i am facing issues in testing the state machine post merging latest changes. I have raised an issue for the same https://github.com/intuit/Trapheus/issues/198. will update on this thread post the fix and my testing and then this PR can be merged

stationeros commented 7 months ago

Thank you namita , will check if these can be prevented by the CI pipeline

namitad commented 7 months ago

@stationeros can we merge this PR? i will add some more incremental changes in follow up PRs