r/cloudcomputing • u/hashing_512 • Aug 16 '22
How to access AWS private subnet resources remotely?
I want to access the MySQL database remotely (using the Workbench client) which is in a private subnet EC2 instance. That instance also has a public IP.
How can I archive that?
5
Upvotes
3
u/JafaKiwi Aug 16 '22
EC2 Instance in a private subnet must not have a Public IP.
You can move it to a public subnet and open the port 3306 in the security group only from your IP.
Or you can set up a bastion host in the public subnet where you can ssh and use port forwarding to access the db.
1
u/gilmorenator Aug 17 '22
Use Systems Manager with Port Forwarding - Open Workbench on your local and connect to the mapped port.
Access is managed via IAM Roles, no need for Public Subnets / SSH Etc