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

(aws-backup): BackupResource has limited support for Aurora RDS #16457

Closed
james-mathiesen opened this issue Sep 10, 2021 · 3 comments · Fixed by #17971
Closed

(aws-backup): BackupResource has limited support for Aurora RDS #16457

james-mathiesen opened this issue Sep 10, 2021 · 3 comments · Fixed by #17971
Labels
@aws-cdk/aws-backup Related AWS Backup effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@james-mathiesen
Copy link

BackupResource does not support RDS Aurora databases.

public static fromRdsDatabaseInstance(instance: IDatabaseInstance): BackupResource

however the type IDatabaseInstance does not encompass Aurora databases. I believe additional methods are
needed to support these additional types:

IDatabaseCluster
IServerlessCluster

Additionally, BackupResource::fromConstruct() ignores Aurora databases even though they are supported by AWS Backup.

Use Case

There is no obvious way to backup Aurora databases from the CDK even though AWS Backup fully supports them.

The escape-hatch like BackupResource::fromArn() is an effective workaround.

@james-mathiesen james-mathiesen added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 10, 2021
@github-actions github-actions bot added the @aws-cdk/aws-backup Related AWS Backup label Sep 10, 2021
@github-actions github-actions bot added the @aws-cdk/aws-rds Related to Amazon Relational Database label Sep 10, 2021
@BenChaimberg BenChaimberg removed the @aws-cdk/aws-rds Related to Amazon Relational Database label Sep 10, 2021
@ahmetsevki
Copy link

ahmetsevki commented Jan 24, 2022

I did the following:

    const clusterArn = `arn:aws:rds:${process.env.CDK_DEFAULT_REGION}:${process.env.CDK_DEFAULT_ACCOUNT}:cluster:${postgresRDSCluster.clusterIdentifier}`
// ...
    plan.addSelection('BackupPlanSelection2', {
      role: backupSelectionRole,
      resources: [BackupResource.fromArn(clusterArn)],
    })

I can see my cluster arn in plan selection, however I still do not see my cluster in the "Protected Resources"list.

Did you pass the cluster arn, or the individual database server arns for it to show up in protected resources?

@jumic
Copy link
Contributor

jumic commented Jan 24, 2022

I found this note in the documentation:

Only resources that have been backed up by AWS Backup are listed under Protected resources.

Did you wait until a backup should be created?

@kaizencc kaizencc added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 24, 2022
@mergify mergify bot closed this as completed in #17971 Jul 14, 2022
mergify bot pushed a commit that referenced this issue Jul 14, 2022
…7971)

Add methods `fromRdsDatabaseCluster` and `fromRdsServerlessCluster` to support RDS database cluster and serverless cluster in AWS Backup. In `BackupableResourcesCollector`, `CfnDBCluster` will be detected and added to the backup selection.

Missing unit tests for `fromRdsDatabaseInstance` were added as well.

Change behaviour of `CfnDBInstance` in `BackupableResourcesCollector`. Database instances will be added only if attribute `dbClusterIdentifier` is not set. In the current implementation, database instances of a database cluster will be added to the backup selection. In my point of view, it is not necessary to backup each database instance of a database cluster if the database cluster is selected. Please check if this change is correct and allowed.

Closes #16457.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-backup Related AWS Backup effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants