1
votes

Is there any API to query a standard AWS RDS without using an SQL client? I see that there is a data API available for serverless Aurora databases (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) but it doesn't work for all RDS types and is not available in all regions at the moment either.

Due to internal firewall rules port 3306 is blocked so I'm looking for another way to talk to an RDS (running the RDS on port 443 has been suggested but is a non-trivial work-around).

1
Would it be feasible to use a SQL client from within your VPC? This way you wouldn't need expose the 3306 port externally. You could for example have a Lambda (or similar) which runs inside the same VPC as your RDS instance and orchestrates the SQL operations. You'd just need to allow the Lambda access to the VPC which can be done with EC2 Security Roles. I can elaborate further if this is an option?j-petty
I need to be able to run queries from outside of AWS altogether - the database is externally accessible but the system I'm trying to query from can't make outgoing connections on port 3306. I already have HTTP API Lambdas that talk to the database in the database VPC but I'd like to avoid creating APIs that expose database internals.tschumann
I don't believe any such API exists for RDS. Your best bet might be to create additional Lambda functions which retrieve the data you require in the external system. I'm not suggesting a Lambda which allows the system to send queries to the DB, rather a different Lambda function which handles each query you require.j-petty
@tschumann I beg your pardon. I see what you're talking about... the sdk might exist but it is not (yet) for general consumption.John Mee

1 Answers

0
votes

Currently the Data API for Aurora Serverless (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) seems to be the only option.

There does not appear to be any equivalent API for standard Aurora databases.