RDS: add support for creating Proxy endpoints
See original GitHub issueI have created a rds cluster:
I am trying to create a rds proxy with both reader and read/write endpoints using AWS CDK
Reproduction Steps
I have created a rds proxy using:
this.rdsCluster = new DatabaseCluster(this, clusterName, {
clusterIdentifier: clusterName,
engine: clusterEngine,
credentials: {
username: ResourcePropsConstants.RDS_MASTER_USER,
excludeCharacters: ';',
},
instanceProps: {
instanceType: new InstanceType(RdsUtils.determineInstanceSize(envName)),
vpc: this.iVpc,
vpcSubnets: {
subnetType: SubnetType.PRIVATE,
},
securityGroups: [this.iRdsSG],
},
storageEncrypted: true,
backup: {
retention: Duration.days(RdsUtils.determineRetentionPeriod(envName)),
},
parameterGroup: this.parameterGroup,
deletionProtection: isHigherEnv,
});
this.rdsProxy = this.rdsCluster.addProxy(dbProxyName, {
dbProxyName,
borrowTimeout: Duration.minutes(3),
maxConnectionsPercent: 85,
maxIdleConnectionsPercent: 10,
idleClientTimeout: Duration.minutes(15),
requireTLS: true,
secrets: [this.rdsSecret],
securityGroups: [this.iRdsProxySG],
vpcSubnets: {
subnetType: SubnetType.PRIVATE,
},
vpc: this.iVpc,
});
What did you expect to happen?
I am expecting two endpoints to be created in the proxy - one with Read/Write and the other with Read target role. When I manually create a proxy using AWS Console a proxy is created with two endpoints
What actually happened?
Only one endpoint was created with Read/Write target role
Environment
- **CDK CLI Version :1.66
- Framework Version:
- Node.js Version:
- OS :
- Language (Version): – Typescript
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:17 (13 by maintainers)
Top Results From Across the Web
Working with Amazon RDS Proxy endpoints - Amazon Aurora
You can create and connect to read-only endpoints called reader endpoints when you use RDS Proxy with Aurora clusters. These reader endpoints help...
Read more >RDS Proxy concepts and terminology
RDS Proxy supports TLS protocol version 1.0, 1.1, and 1.2. You can connect to the proxy using a higher version of TLS than...
Read more >8.4: Use RDS Proxy to minimize failover disruptions
Open the Amazon RDS service console . Click on the Proxies Link on the Navigation Bar on the left. Click on Create proxy....
Read more >AWS Supports You | Diving Deep into Amazon RDS Proxy for ...
We would love to hear your feedback about our show! Please take our survey here: ...
Read more >Use Amazon RDS Proxy with read-only endpoints
RDS Proxy lets you create additional endpoints with either a read-only or read/write role. An endpoint with a read-only role routes your queries ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok. Looks like there’s a resource called
AWS::RDS::DBProxyEndpoint
. This is probably what’s missing from theDatabaseProxy
class today.You can create them today by using the
CfnDBProxyEndpoint
from the CDK. I’ll keep this issue open as a feature request to add support for Proxy endpoints to ourDatabaseProxy
class.I am going for the following approach:
On
DatabaseProxy
:Note to self: I need to add an index to the id to make it unique in the scope