Skip to content

Accidentally deleted VPC and subnets — need help restoring SSH tunnel access to EC2

0

Hi,

I'm working with a setup that previously used an EC2 instance and an SSH tunnel to access an external service (not managed by me). Unfortunately, I accidentally deleted the VPC and subnets that were part of this setup. I am not the developer who originally configured this, and I don’t have the original setup details or backups.

Is there any way to recover the deleted VPC/subnet configuration?

If not, what is the best way to recreate a working network environment that will allow me to re-establish SSH tunnel access through EC2 (e.g. VPC, subnet type, routing, etc.)?

Thanks in advance for your help!

1 Answer
1

Hello.

You can recreate the default VPC.
Create a default VPC subnet and create an EC2 instance with a public IP address attached.
Configure the EC2 security group to allow SSH connections from your IP address.
https://docs.aws.amazon.com/vpc/latest/userguide/work-with-default-vpc.html#create-default-vpc
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html#ec2-launch-instance

Some configuration is required on EC2, but Systems Manager Session Manager also has a port forwarding function, so I recommend you also read the following documentation.
https://aws.amazon.com/jp/blogs/mt/use-port-forwarding-in-aws-systems-manager-session-manager-to-connect-to-remote-hosts/

EXPERT

answered a year ago

AWS
EXPERT

reviewed a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.