Search code examples
mysqldatabaseamazon-web-servicesamazon-rdsamazon-ecs

How to connect to private rds in network load balancer and ecs with mysql workbench


enter image description here

My AWS Architecture is like the image.
My professor suggested me make public rds into private rds.
I did it. But I don't know how to open it with mysql workbench.
Thanks for any help.

ecs : task definition with ec2
rds : Aurora-mysql
security group : load balancer security group enter image description here

enter image description here

enter image description here

I put SSH hostname as load balancer DNS name which is my website name.
SSH Username : ec2-user
and SSH Key file with the key-pair.
This doesn't work well.

enter image description here


Solution

  • You can create a Bastion host in public subnet in the same VPC with your RDS and use it at a Jump server.

    For detail, you can follow this blog:

    https://aws.amazon.com/premiumsupport/knowledge-center/rds-mysql-ssh-workbench-connect-ec2/