Skip to content

aws-rds: How to enable final snapshot for Aurora Cluster  #24577

Closed

Description

@MetadelDes

Describe the bug

I am creating database cluster, and i want to enable final snapshot. After creation of the rds, when i navigate to the console, upon modifying the deletion protection and delete the cluster, i dont see the option for "create final snapshot"

here is the code:

.cluster = new DatabaseCluster(this, 'Cluster', {
      engine: rds.DatabaseClusterEngine.auroraPostgres(this.newProps),
      credentials: auroraClusterCrendentials,
      cloudwatchLogsRetention: logs.RetentionDays.ONE_YEAR,
      clusterIdentifier:" namee",
      instanceProps:
      {
        instanceType: props.instanceType,
        vpcSubnets: {
          subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
        },
        vpc: existingVpc,                  
      },
      parameterGroup: clusterParameterGroup,
      iamAuthentication: true,
      deletionProtection: deletionProtection,
    });

Expected Behavior

I wanted to see create final snapshot selected, is there a way to enable create final snapshot for rds cluster
image

Current Behavior

image

Reproduction Steps

  1. Create cluster with above code through cdk,

  2. cdk deploy

  3. navigate to the console and modify the cluster to turn off delete protection

  4. try to delete either the reader or writer instance

the above screen shows up instead of seeing final snapshot option. Could you please tell me how to enable final snapshot option through cdk. I couldn't find info on that. Thanks

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.44

Framework Version

No response

Node.js Version

10.17.27

OS

Microsoft Windows 10 enterprise

Language

Typescript

Language Version

3.9.7

Other information

No response

Activity

  1. added
    bugThis issue is a bug.
    needs-triageThis issue or PR still needs to be triaged.
    on Mar 11, 2023
  2. pahud commented on Mar 13, 2023

    @pahud
    Contributor

    Hi

    Have you tried removalPolicy.SNAPSHOT ? When this specified, when you destroy the cluster with CDK, the latest snapshot of the database cluster should be taken.

  3. added
    response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.
    and removed
    needs-triageThis issue or PR still needs to be triaged.
    on Mar 13, 2023
  4. MetadelDes commented on Mar 14, 2023

    @MetadelDes
    Author

    Hi

    Have you tried removalPolicy.SNAPSHOT ? When this specified, when you destroy the cluster with CDK, the latest snapshot of the database cluster should be taken.

    @pahud Okay I will try that now. Thanks! One more question how do i set the name of the cluster parameter group and instance parameter group? I dont see a property to set the name from CDK documentation. I dot want to see the auto generated string. Could you please help?

  5. removed
    response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.
    on Mar 14, 2023
  6. removed
    bugThis issue is a bug.
    on Mar 14, 2023
  7. pahud commented on Mar 14, 2023

    @pahud
    Contributor

    @MetadelDes

    cluster parameter should be https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseCluster.html#parametergroup and instance parameter should be defined in instanceProps https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.InstanceProps.html#parametergroup

    Please note I haven't verified it in my account yet but according to the doc it should work.

  8. added
    response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.
    on Mar 14, 2023
  9. changed the title [-]Unable to enable final snapshot for Aurora Cluster [/-] [+]aws-rds: How to enable final snapshot for Aurora Cluster [/+] on Mar 14, 2023
  10. added
    guidanceQuestion that needs advice or information.
    on Mar 14, 2023
  11. pahud commented on Mar 14, 2023

    @pahud
    Contributor

    I am converting this issue to discussion for general guidance.

  12. locked and limited conversation to collaborators on Mar 14, 2023
  13. converted this issue into a discussion #24622 on Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

@aws-cdk/aws-rdsRelated to Amazon Relational DatabaseguidanceQuestion that needs advice or information.p2response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions