Connect to Aurora Serverless using EC2 as Proxy

2019-04-14 16:37发布

问题:

Not a duplicate of AWS Aurora MySQL serverless: how to connect from MySQL Workbench.

Aurora Serverless doesn't support public connections yet.

I used Cloud9 to create an EC2 instance on the same VPN as the database. I then connected to the database from the Cloud9 terminal.

My (GraphQL Prisma) service that I'm attempting to host (on Zeit Now) only takes a HOST and a PASSWORD for configuration.

How can I make the EC2 instance act as a proxy that I can treat exactly as a database endpoint. Can tunneling fully do that and I'm just bad at it?

回答1:

I think this blog may help you. The idea, is make a forwarding port from ec2-dns:3306 to aurora-serverless-cluster-dns:3306