I think this is one of lots of questions that is being asked around. How to connect to the private subnet from local laptop?
The answers are 3 approaches:
- Connect via Bastion Host
- You can use EC2 instance as jumpbox to connect to your private subnet resources.
- You can use AWS System Manager Session Manager to connect to your private subnet resources.
- Connect via Tunneling
- You can use SSH tunneling from EC2 instance = https://binx.io/blog/2018/11/21/aws-ssh-tunneling/
example:$ ssh -N -L8080:ip-10-0-1-92.eu-west-1.compute.internal:80 -i bastion.pem ec2-user@ec2-34-254-194-35.eu-west-1.compute.amazonaws.com
- You can use AWS System Manager Session Manager port forwarding to connect to private resources = https://aws.amazon.com/blogs/aws/new-port-forwarding-using-aws-system-manager-sessions-manager/
- You can use SSH tunneling from EC2 instance = https://binx.io/blog/2018/11/21/aws-ssh-tunneling/
- Connect via VPN
- Use highly reliable and scalable Site to Site VPN from AWS Managed VPN Services
- Use Use highly reliable and scalable AWS Client VPN Services
- Deploy a 3rd party VPN Server at AWS Environment
Hope it is useful.
Best,
Doddi