Skip to content

aws-rds: defaultDatabaseName name constrain change caused database replacement. #38667

Description

@sasuolanderSito

Describe the bug

When updating DatabaseCluster with defaultDatabaseName value ${envName}-db caused error "DatabaseName must begin with a letter and contain only alphanumeric characters".
We where forced change code into " defaultDatabaseName: ${envName}_db," and doing some data recovery hurdles.

I think CDK has been doing defaultDatabaseName value sanitatiotion and now this functionality is removed.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

2.234.1

Expected Behavior

Name with "-" should be allowed.

Current Behavior

Cannot use "-" symbol in database name.

Reproduction Steps

Create aurora db on version 2.234.1 with defaultDatabaseName containning "-" in name.
CDK allow database creation.
Updated newer CDK version.
Try to update stack and get errro "DatabaseName must begin with a letter and contain only alphanumeric characters.

Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.234.1

AWS CDK CLI version

--

Node.js Version

24

OS

Windows

Language

TypeScript

Language Version

No response

Other information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-rdsRelated to Amazon Relational DatabasebugThis issue is a bug.investigatingThis issue is being investigated and/or work is in progress to resolve the issue.p2potential-regressionMarking this issue as a potential regression to be checked by team member

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions