I am trying to use a NAT Instance rather than a NAT Gateway; I am also not using any Community AMIs for the NAT Instance configuration.
I am trying to do a yum update from my private but I am thrown the following error: Cannot find a valid baseurl for repo: amzn-main/latest
My AWS stack is as follows:
- VPC: A VPC
VPC1
with an Internet GatewayIGW1
attached. - Subnets: Two subnets - public in
us-east-1a
and private inus-east-1b
.- Public subnet:
Subnet1.1-1a
has Route table [Public-IGW-1
with local and IGW1 - 0.0.0.0/0]. - Private subnet:
Subnet1.2-1b
has Route table [Private-1
with local and NAT instanceNAT EC2 1
- 0.0.0.0/0].
- Public subnet:
- Route tables:
Private-1
has routeslocal
andNAT EC2 1
instance - 0.0.0.0/0.Public-IGW-1
has routeslocal
and IGW1 - 0.0.0.0/0.
- Security groups:
Subnet-1.1-1a-Public
fromus-east-1a
in VPC1 has SSH MyIP and HTTP with anywhere.Subnet1.1-1a-Private
fromus-east-1b
(have to rename; else deceiving) in VPC1 has inbound 22 - anywhere. - Instances:
NAT EC2 1
lives inSubnet1.1-1a
ofVPC1
with Security groupNAT SG
inbound 80 - anywhere 22. Private instance has SG - 22 - anywhere. Public instance has SG - 22 - MyIP and 80 - anywhere.
I copied my keypair into the public instance with scp and ssh-ed into the private instance with ssh -i keypair ec2-user@private-ip-addr. When I do a sudo yum update the error canot find a valid baseurl is shown.
I have made sure that NACL is allowing all traffic.