The ec2 instance can't access internet in a public subnet without a elastic ip address?

后端 未结 2 983
刺人心
刺人心 2021-02-04 05:16

I working on aws. I created a public subnet which has a network ACL allows all net traffic, and associated with a internet gateway in the route table.

And then I create

2条回答
  •  星月不相逢
    2021-02-04 05:53

    As well as being in a subnet that has a route to an Internet gateway, an instance must have a public IP address to communicate with the outside world (this is distinct from an elastic IP).

    You can specify this when launching an instance, if not there is a per subnet setting that controls this. The per subnet setting defaults to false other than default subnets in your default VPC. There are more details in the aws docs.

提交回复
热议问题