Skip to content
26 changes: 26 additions & 0 deletions packages/aws-cdk-lib/aws-rds/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,31 @@ interface DatabaseClusterBaseProps {
* @deprecated Use clusterScalabilityType instead. This will be removed in the next major version.
*/
readonly clusterScailabilityType?: ClusterScailabilityType;

/**
* The life cycle type for this DB cluster.
*
* @see https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/extended-support.html
* @see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html
*
* @default undefined - AWS RDS default id `EngineLifecycleSupport.OPEN_SOURCE_RDS_EXTENDED_SUPPORT`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 'default id' a typo? Did you mean something like 'default setting is'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct that the default setting is extended support enabled?

According to the documentation, extended support is not enabled by default.

If you use the console, you must select Enable RDS Extended Support. The setting isn't selected by default.

Copy link
Contributor Author

@badmintoncryer badmintoncryer Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 'default id' a typo? Did you mean something like 'default setting is'?

This is typo. I'll update it later!

Is it correct that the default setting is extended support enabled?

Cloudformation document says By default, this value is set to open-source-rds-extended-support, which enrolls your DB cluster into Amazon RDS Extended Support.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-enginelifecyclesupport

I'll check it later by deploying the stack in default configration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mazyu36

I confirmed that this parameter is automatically enabled by cloudformation default.

CDK

new DatabaseCluster(this, 'Database', {
      engine: DatabaseClusterEngine.auroraMysql({
        version: AuroraMysqlEngineVersion.VER_3_07_1,
      }),
      vpc,
      // engineLifecycleSupport: EngineLifecycleSupport.OPEN_SOURCE_RDS_EXTENDED_SUPPORT,
      writer: ClusterInstance.provisioned('writer', {
        instanceType: ec2.InstanceType.of(ec2.InstanceClass.R7G, ec2.InstanceSize.LARGE),
      }),
    });

Cfn

"DatabaseB269D8BB": {
   "Type": "AWS::RDS::DBCluster",
   "Properties": {
    "CopyTagsToSnapshot": true,
    "DBClusterParameterGroupName": "default.aurora-mysql8.0",
    "DBSubnetGroupName": {
     "Ref": "DatabaseSubnets56F17B9A"
    },
    "Engine": "aurora-mysql",
    "EngineVersion": "8.0.mysql_aurora.3.07.1",
    "MasterUserPassword": {
     "Fn::Join": [
      "",
      [
       "{{resolve:secretsmanager:",
       {
        "Ref": "DatabaseSecret3B817195"
       },
       ":SecretString:password::}}"
      ]
     ]
    },
    "MasterUsername": {
     "Fn::Join": [
      "",
      [
       "{{resolve:secretsmanager:",
       {
        "Ref": "DatabaseSecret3B817195"
       },
       ":SecretString:username::}}"
      ]
     ]
    },
    "VpcSecurityGroupIds": [
     {
      "Fn::GetAtt": [
       "DatabaseSecurityGroup5C91FDCB",
       "GroupId"
      ]
     }
    ]
   },
   "UpdateReplacePolicy": "Snapshot",
   "DeletionPolicy": "Snapshot"
  },

Result

スクリーンショット 2025-04-01 9 59 51

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your confirmation.
I understand that the current description is correct.​​​​​​​​​​​​​​​​

*/
readonly engineLifecycleSupport?: EngineLifecycleSupport;
}

/**
* Engine lifecycle support for Amazon RDS and Amazon Aurora
*/
export enum EngineLifecycleSupport {
/**
* Using Amazon RDS extended support
*/
OPEN_SOURCE_RDS_EXTENDED_SUPPORT = 'open-source-rds-extended-support',

/**
* Not using Amazon RDS extended support
*/
OPEN_SOURCE_RDS_EXTENDED_SUPPORT_DISABLED = 'open-source-rds-extended-support-disabled',
}

/**
Expand Down Expand Up @@ -945,6 +970,7 @@ abstract class DatabaseClusterNew extends DatabaseClusterBase {
autoMinorVersionUpgrade: props.autoMinorVersionUpgrade,
monitoringInterval: props.enableClusterLevelEnhancedMonitoring ? props.monitoringInterval?.toSeconds() : undefined,
monitoringRoleArn: props.enableClusterLevelEnhancedMonitoring ? this.monitoringRole?.roleArn : undefined,
engineLifecycleSupport: props.engineLifecycleSupport,
};
}

Expand Down