Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(RDS): AuroraClusterInstance implement availabilityZone for provisioned instance type #30618

Open
1 of 2 tasks
a-skuba opened this issue Jun 21, 2024 · 2 comments
Open
1 of 2 tasks
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p3

Comments

@a-skuba
Copy link

a-skuba commented Jun 21, 2024

Describe the feature

AuroraClusterInstance and ProvisionedClusterInstanceProps do not expose availability zone.

Use Case

We want to create multiple readers in specific availability zones.
We want to control, that each availability zone has at least one reader.

Proposed Solution

Add availabilityZone property to ProvisionedClusterInstanceProps and use it in AuroraClusterInstance when using ClusterInstance.provisioned() method.

Other Information

availabilityZone should be only used for InstanceType.PROVISIONED.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.147.0

Environment details (OS name and version, etc.)

Any

@a-skuba a-skuba added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 21, 2024
@github-actions github-actions bot added the @aws-cdk/aws-rds Related to Amazon Relational Database label Jun 21, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 21, 2024
@khushail khushail self-assigned this Jun 21, 2024
@khushail
Copy link
Contributor

khushail commented Jun 21, 2024

@a-skuba ,Thanks for reaching out and submission of the FR.

@khushail khushail added p3 effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jun 21, 2024
@khushail khushail removed their assignment Jun 21, 2024
@HannesBBR
Copy link

Hi, we have the same use case where we want to explicitly distribute our Aurora cluster instances over specific AZs (in our case both for serverless and provisioned instances).

FYI, our current workaround is to explicitly override the AZ property with something like this:

private spreadInstancesOverAzs(availabilityZones: string[]) {
    this.cluster.instanceIdentifiers.forEach((_, idx) => {
        const az = availabilityZones[idx % availabilityZones.length];
        const cfnDBInstance = this.cluster.node.tryFindChild(`instance-${idx + 1}`)?.node.defaultChild as CfnDBInstance;
        cfnDBInstance.availabilityZone = az;
    });
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p3
Projects
None yet
Development

No branches or pull requests

3 participants