django-ecs-terraform icon indicating copy to clipboard operation
django-ecs-terraform copied to clipboard

can't reach via ssh my ec2 instance - I think the cause is due to the vpc.

Open drandredev opened this issue 2 years ago • 4 comments

image

drandredev avatar Apr 11 '22 18:04 drandredev

I had the same issue. Did you ever resolve this?

cugarteblair avatar May 03 '22 17:05 cugarteblair

I temporarily changed the route table. Change the entry that routes to the NAT gateway route; Make it route to the internet gateway instead. Then you can access the private subnets for SSH. When you are done restore the route.

cugarteblair avatar May 04 '22 17:05 cugarteblair

I temporarily changed the route table. Change the entry that routes to the NAT gateway route; Make it route to the internet gateway instead. Then you can access the private subnets for SSH. When you are done restore the route.

Can you post an example, please?

tarkin88 avatar May 21 '22 21:05 tarkin88

For me this temporary solution is working

resource "aws_route" "nat-gw-route" {
  route_table_id         = aws_route_table.private-route-table.id
  # nat_gateway_id         = aws_nat_gateway.nat-gw.id
  gateway_id             = aws_internet_gateway.production-igw.id
  destination_cidr_block = "0.0.0.0/0"
}

Cguilliman avatar Sep 18 '22 21:09 Cguilliman