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

(ServerlessCluster): cdk deploy failure with custom subnetgroup reference #13976

Closed
quixoticmonk opened this issue Apr 4, 2021 · 2 comments · Fixed by #13986
Closed

(ServerlessCluster): cdk deploy failure with custom subnetgroup reference #13976

quixoticmonk opened this issue Apr 4, 2021 · 2 comments · Fixed by #13986
Assignees
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database bug This issue is a bug. effort/small Small work item – less than a day of effort p1

Comments

@quixoticmonk
Copy link

Description of the bug:

CDK deploy fails for an aurora serverless cluster when the subnetgroup name provided by user is uppercase. I had the resources in the cluster ( security group, subnetgroup etc) created with the names including the clustername as well; which was provided using a context value in cdk.json.

Reproduction Steps

  • Create Aurora serverless cluster construct with a subnet group defined rather than leaving it blank.
  • The name of the subnet group is derived using the cluster name defined in the cdk.json.
  • Cluster name is Uppercase and run a cdk synth .
  • CDK/CloudFormation converts the subnetgroup name to lowercase.
  • The cdk synth output shows cluster is referencing the id of the subnet group in cloudformation json/yaml.
  • Deploy fails with the message " does not exist" while the subnet group exists.

Note:

  • The subnet group is created before the cluster as expected and then rolls back as the association to the cluster fails.

Screen Shot 2021-04-02 at 4 04 28 PM
Screen Shot 2021-04-02 at 4 02 32 PM
Screen Shot 2021-04-02 at 4 02 50 PM

Screen Shot 2021-04-02 at 4 07 08 PM
Screen Shot 2021-04-02 at 4 10 12 PM
Screen Shot 2021-04-02 at 4 10 06 PM
Screen Shot 2021-04-02 at 4 07 53 PM

What did you expect to happen?

Since the reference was to the id of the subnetgroup, I would expect the cdk deploy to work and deploy the cluster

What actually happened?

Error message as in screenshot below
Screen Shot 2021-04-02 at 4 07 08 PM

Environment

  • CDK CLI Version : 1.96.0
  • **Framework Version:**1.96.0
  • OS : Linux ( CDK pipeline & Cloud9 environment)
  • Language (Version): Python 3.8

This is 🐛 Bug Report

@quixoticmonk quixoticmonk added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 4, 2021
@peterwoodworth peterwoodworth added the @aws-cdk/aws-rds Related to Amazon Relational Database label Apr 5, 2021
@skinny85
Copy link
Contributor

skinny85 commented Apr 5, 2021

Thanks for reporting @quixoticmonk. Confirming I was able to reproduce the problem.

@skinny85 skinny85 added effort/small Small work item – less than a day of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Apr 5, 2021
skinny85 added a commit to skinny85/aws-cdk that referenced this issue Apr 5, 2021
As it turns out, RDS stores the name of the SubnetGroup in lowercase on the server-side.
The problem is that we weren't changing the case in CloudFormation,
and thus expressions like `{ Ref: SubnetGroup }` were using the wrong casing,
resulting in the RDS service failing with a 404 error when providing a name for the SubnetGroup.

Fixes aws#13976
@mergify mergify bot closed this as completed in #13986 Apr 9, 2021
mergify bot pushed a commit that referenced this issue Apr 9, 2021
As it turns out, RDS stores the name of the SubnetGroup in lowercase on the server-side.
The problem is that we weren't changing the case in CloudFormation,
and thus expressions like `{ Ref: SubnetGroup }` were using the wrong casing,
resulting in the RDS service failing with a 404 error when providing a name for the SubnetGroup.

Fixes #13976

----

*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

github-actions bot commented Apr 9, 2021

⚠️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.

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
As it turns out, RDS stores the name of the SubnetGroup in lowercase on the server-side.
The problem is that we weren't changing the case in CloudFormation,
and thus expressions like `{ Ref: SubnetGroup }` were using the wrong casing,
resulting in the RDS service failing with a 404 error when providing a name for the SubnetGroup.

Fixes aws#13976

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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 bug This issue is a bug. effort/small Small work item – less than a day of effort p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants