aws / aws/aws-cdk

(rds): Make Aurora cluster instance class publicly available

Open
#34,103 1 comment 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-rds effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

- The `AuroraClusterInstance` class is [private](https://github.com/aws/aws-cdk/blob/eec900e90f38f34f896b22cf36cb225fc9c13cc8/packages/aws-cdk-lib/aws-rds/lib/aurora-cluster-instance.ts#L486). Thus, I can't find it in the node tree.
- The static [factory methods returns](https://github.com/aws/aws-cdk/blob/eec900e90f38f34f896b22cf36cb225fc9c13cc8/packages/aws-cdk-lib/aws-rds/lib/aurora-cluster-instance.ts#L400) `IClusterInstance`, which is not helpful and only has the `bind` method.
- I can't search for the `CfnDBInstance` instance because every construct ID value is a `Resource`, and every other prop is a token.

### Use Case

Sometimes, I need to get at instance-specific values, such as instance ID, or instance endpoint, e.g. for monitoring purposes.

### Proposed Solution

1. Make the `AuroraClusterInstance` class public and make it discoverable on the cluster.
2. Create the ability to pass the concrete `AuroraClusterInstance` instance that implements the `IClusterInstance` as the cluster reader and writer.

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

latest

### Environment details (OS name and version, etc.)

macOS

Contributor guide

Open the contributing guide

Research direction

Start with packages/aws-cdk-lib/aws-rds/lib/aurora-cluster-instance.ts, especially AuroraClusterInstance and the static factory methods linked in the issue. Trace how the cluster exposes reader and writer instances, then check the public API exports and related construct tree behavior. Done means the concrete instance is publicly discoverable and usable for instance-specific values and reader/writer configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.