-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
@aws-cdk/aws-rdsRelated to Amazon Relational DatabaseRelated to Amazon Relational Databaseeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Describe the feature
Related Issue: #31720
Implement a lookup function for RDS DatabaseCluster similar to the existing DatabaseInstance.fromLookup functionality.
This allows users to fetch an Aurora RDS cluster reference by identifier rather than having to manually provide all connection details.
Use Case
Currently, to reference an existing Aurora cluster, users need to provide many details manually using DatabaseCluster.fromDatabaseClusterAttributes().
This is cumbersome and error-prone, especially when these values can change over time.
Proposed Solution
Add lookup method that retrieves all necessary attributes through the CDK context provider:
const cluster = DatabaseCluster.fromLookup(stack, "AuroraCluster", {
clusterIdentifier: "my-aurora-cluster"
});
Other Information
- Implementation follows the pattern established by DatabaseInstance.fromLookup
- Added unit and integration tests to verify functionality
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS CDK Library version (aws-cdk-lib)
2.161.0
AWS CDK CLI version
2.1019.1
Environment details (OS name and version, etc.)
OSX
badmintoncryer
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-rdsRelated to Amazon Relational DatabaseRelated to Amazon Relational Databaseeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2