Skip to content

Conversation

@ysunio
Copy link
Contributor

@ysunio ysunio commented Sep 4, 2025

Fix Aurora CDK construct deprecation and critical issues

This PR addresses multiple critical issues in the Aurora CDK example:

Changes made:

  • Replace deprecated instanceProps with new writer and readers properties
  • Move VPC configuration to cluster level instead of instance level
  • Add proper validation for required vpcId and subnetIds props
  • Update to latest Aurora engine versions (PostgreSQL 15.4, MySQL 3.04.0)
  • Fix typo in secret description and improve error handling
  • Add app.synth() call to generate CloudFormation templates

Why these changes were needed:

  • The existing code used deprecated CDK properties that will be removed in future versions
  • Missing validation caused runtime errors when required props weren't provided
  • Engine versions were outdated and potentially unsupported
  • The example wasn't generating CloudFormation templates properly

Fixes #


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sunil Yadav and others added 4 commits September 4, 2025 14:46
- Add validation for required vpcId and subnetIds props
- Set default username to 'clusteradmin' when not provided
- Update to latest Aurora engine versions (PostgreSQL 15.4, MySQL 3.04.0)
- Fix typo in secret description (Crendetials -> Credentials)
- Use validated instanceType variable in cluster creation
- Add app.synth() call to generate CloudFormation templates
- Update example with realistic placeholder values
- Use new writer and readers properties instead of deprecated instanceProps
- Create writer instance and reader instances based on replicaInstances count
- Move vpc, vpcSubnets, and securityGroups to cluster level
- Replace instanceIdentifierBase with clusterIdentifier
Copy link
Contributor

@kaiz-io kaiz-io left a comment

Choose a reason for hiding this comment

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

LGTM
Approving workflow to run CI checks.

@kaiz-io kaiz-io merged commit 80b50cf into aws-samples:main Oct 9, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants