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

Model Trapheus as an AWS Systems Manager automation #174

Closed namitad closed 8 months ago

namitad commented 8 months ago

Trapheus is currently modelled as an AWS step function or state machine.

This issue looks to alternatively support Trapheus as a SSM automation which can be run on AWS, cloned and shared with other accounts etc. https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-creating-content.html

stationeros commented 8 months ago

What is the outcome expected in terms of deliverable here ?

namitad commented 8 months ago

the outcome expected here is a json/yaml with the automation document - which can also be modelled as a cloud formation template

stationeros commented 8 months ago

What is the limitation in the way its currently modelled?

namitad commented 8 months ago

this is an alternate approach with the advantage of directly invoking aws apis and waiters without requiring custom lambda creation and ability to run out of the box in single account, cross accounts/cross regions

stationeros commented 8 months ago

did you take a look at https://github.com/aws-samples/ssm-for-rds-snapshot-cross-region-copy

namitad commented 8 months ago

yes. there is also this for cross account https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-aws-sharerdssnapshot.html provided by amazon.

these are still some parts of what trapheus solves. i feel it will be good to have a possible end to end automation of trapheus on SSM.

did you take a look at https://github.com/aws-samples/ssm-for-rds-snapshot-cross-region-copy

anything particular you wanted to focus upon here @stationeros ?

stationeros commented 8 months ago

I am saying the above looks like a solved problem to me with https://github.com/aws-samples/ssm-for-rds-snapshot-cross-region-copy. If you feel the output of this issue would be any different from https://github.com/aws-samples/ssm-for-rds-snapshot-cross-region-copy , feel free to convert this issue into a discussion and create few fine grained issues.

namitad commented 8 months ago

https://github.com/aws-samples/ssm-for-rds-snapshot-cross-region-copy - this solves only for copying Aurora RDS snapshots across regions - so the output here is a copy of a aurora snapshot in different regions. Trapheus currently does creation of snapshots, automated db restoration along with snapshot export to s3 for all RDS albeit in one account - the output here is a restored RDS instance/cluster for any kind of RDS. Modelling as a ssm could help enable that complete restoration flow to be executed more seamlessly in one account, across accounts and different regions without the requirement of setting up the CFT in every region or account.

stationeros commented 8 months ago

Got it, if thats the case convert this issue into a discussion , and create more detailed and focussed issues, which can be solved in HF timeframe and can encourage a contribution, since this would involve multiple things. See if you can break this into smaller subtasks if possible.