Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(rds): Support Point-in-Time Database Cluster Recovery via L2 DatabaseCluster construct #25998

Open
1 of 2 tasks
blimmer opened this issue Jun 15, 2023 · 1 comment
Open
1 of 2 tasks
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct feature-request A feature should be added or improved. p2

Comments

@blimmer
Copy link
Contributor

blimmer commented Jun 15, 2023

Describe the feature

As of March 2023, the AWS::RDS::DBCluster CloudFormation resource supports the RestoreToTime property.

It would be great if there were an L2-construct (ala DatabaseClusterFromSnapshot) that made restoring a database to a point-in-time simpler.

Use Case

The DatabaseClusterFromSnapshot construct is great if you have a snapshot you want to restore from. However, a Point-In-Time Recovery (PITR) might be preferable in disaster recovery scenarios.

Proposed Solution

Two ideas:

  1. A new DatabaseClusterFromPointInTime construct
  2. Create a new RestoredDatabaseCluster construct that encapsulates restoring from a point in time or a snapshot.

Creating a new construct feels more in line with what we have today for snapshots.

However, the second option feels "cleaner" because the same principals of restoring from a snapshot apply to the PITR option (a new database is created, etc.)

RestoredDatabaseCluster might take something like this:

export interface RestoredDatabaseProps extends DatabaseClusterBaseProps {
    // provide one or the other
    readonly snapshotIdentifier?: string;
    readonly restoreToTime?: string;
}

Other Information

Alternatively, you can reach into the L1 construct to set the RestoreToTime property.

In the past, to keep my database managed by CloudFormation/CDK, I've created a temporary new Database cluster via PITR (via the console), taken a snapshot, then used DatabaseClusterFromSnapshot.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.84.0

Environment details (OS name and version, etc.)

MacOS

@blimmer blimmer added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 15, 2023
@indrora indrora added p2 @aws-cdk/aws-rds Related to Amazon Relational Database effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct and removed needs-triage This issue or PR still needs to be triaged. labels Jun 15, 2023
@aros3rg3d
Copy link

I'd love to have this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants