[aws-cdk] rds module not able to add proxy
See original GitHub issueHey, i’m currently trying to add a RDS proxy to my db cluster. Apparently, i get following error: Cannot read property ‘engine’ of undefined.
Reproduction Steps
const vpc = ec2.Vpc.fromLookup(myScope, 'someId', {
vpcId: 'vpc-id'
});
const securityGroup = ec2.SecurityGroup.fromSecurityGroupId(myScope,
'someId',
'securit-group-id'
);
const cluster = DatabaseCluster.fromDatabaseClusterAttributes(myScope, 'someId', {
port,
securityGroups: [securityGroup],
clusterIdentifier: 'cluster-identifier',
instanceIdentifiers: ['instance-identifier'],
clusterEndpointAddress: ''writer-endpoint,
readerEndpointAddress: 'reader-endpoint',
instanceEndpointAddresses: ['instance endpoint']
});
const secret = new Secret(myScope, 'Secret');
cluster.addProxy('testProxy', {
borrowTimeout: cdk.Duration.seconds(30),
maxConnectionsPercent: 50,
secrets: [secret],
vpc
});
Error Log
Cannot read property ‘engine’ of undefined.
Environment
- **CLI Version :1.53.0
- **Framework Version: 1.53.0
- **Node.js Version: 10.19.0
- OS :
- **Language (Version): all
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Troubleshooting for RDS Proxy - Amazon Aurora
Some possible reasons include the following: The proxy can't establish a database connection because the maximum connections have been reached. The proxy can't ......
Read more >@aws-cdk/aws-rds - npm
The following example shows granting connection access for RDS Proxy to an IAM role. declare const vpc: ec2. Vpc; const cluster = new...
Read more >How to Connect to AWS RDS from AWS Lambda
In this article, we're going to learn about how to communicate with AWS RDS from AWS Lambda. In this tutorial, we'll be using...
Read more >How to add a security group to an existing RDS with CDK ...
Also maybe the other way round the RDS security group might be better described by aws_rds module rather than aws_ec2 module ...
Read more >Create a Rest API with AWS API Gateway, a Lambda function ...
Since we believe that AWS CDK is one of the most advanced tools ... the AWS resources needed for a Rest API that...
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 FreeTop 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
Top GitHub Comments
Sorry, currently not available
DatabaseCluster.fromDatabaseClusterAttributes
returnsIDatabaseCluster
, which doesn’t haveengine
in it.There’s no way to read
engine
from imported RDS instance/cluster resource at the moment.Its’ unstable that it currently rely on
(this.dbCluster.node.defaultChild as CfnDBCluster).engine
.https://github.com/aws/aws-cdk/blob/489eae64f6613cac85da2a70b33435052901255b/packages/%40aws-cdk/aws-rds/lib/proxy.ts#L69-L75
Ideas and suggestions are welcome.
Any updates on this @civilizeddev ?
Best,
Roland