ladderlore
  • 输入服务名称,例如 S3 或 IAM。

概念

VPC components: subnets, route tables and gateways

The parts of a VPC: public and private subnets, route tables, gateways, endpoints and peering.

本课尚未翻译,暂以英文显示。

VPCAvailability ZonePublic subnetPrivate subnet
互联网
Internet gateway
NAT gateway
Load BalancingEC2
  1. 1Users on the internet reach the VPC through its internet gateway.
  2. 2The load balancer is in a public subnet. Its route table has a route to the internet gateway, so traffic from the internet can reach it.
  3. 3The load balancer passes each request to an EC2 instance in the private subnet. The internet cannot reach that instance directly.
  4. 4When the instance needs to download an update, it sends the request to the NAT gateway.
  5. 5The NAT gateway sends it out through the internet gateway, and the reply comes back the same way.
One Availability Zone of a VPC, with a public and a private subnet. A real setup repeats them in a second zone.

分步说明

  1. 1Users on the internet reach the VPC through its internet gateway.
  2. 2The load balancer is in a public subnet. Its route table has a route to the internet gateway, so traffic from the internet can reach it.
  3. 3The load balancer passes each request to an EC2 instance in the private subnet. The internet cannot reach that instance directly.
  4. 4When the instance needs to download an update, it sends the request to the NAT gateway.
  5. 5The NAT gateway sends it out through the internet gateway, and the reply comes back the same way.

One Availability Zone of a VPC, with a public and a private subnet. A real setup repeats them in a second zone.

  • Subnet

    A range of IP addresses in one Availability Zone. You launch resources into it.

  • Route table

    Rules that send a subnet’s traffic to a target. A route to an internet gateway makes the subnet public.

  • Internet gateway

    Connects the VPC to the internet. Connections can start from either side.

  • NAT gateway

    Gives private resources a way out to the internet. Nobody outside can start a connection to them.

  • Virtual private gateway

    The AWS end of a Site-to-Site VPN connection. It is attached to one VPC.

  • Customer gateway

    Your end of a Site-to-Site VPN connection, such as a router or firewall in your data center.

  • VPC endpoint

    Reaches AWS services such as Amazon S3 privately, with no internet gateway or NAT gateway.

  • VPC peering

    Joins two VPCs so they talk over private IP addresses. One to one, and not transitive.

The parts of a VPC you are expected to know, including both ends of a VPN connection.

1 / 3

  • Subnet

    A range of IP addresses in one Availability Zone. You launch resources into it.

  • Route table

    Rules that send a subnet’s traffic to a target. A route to an internet gateway makes the subnet public.

  • Internet gateway

    Connects the VPC to the internet. Connections can start from either side.

2 / 3

  • NAT gateway

    Gives private resources a way out to the internet. Nobody outside can start a connection to them.

  • Virtual private gateway

    The AWS end of a Site-to-Site VPN connection. It is attached to one VPC.

  • Customer gateway

    Your end of a Site-to-Site VPN connection, such as a router or firewall in your data center.

3 / 3

  • VPC endpoint

    Reaches AWS services such as Amazon S3 privately, with no internet gateway or NAT gateway.

  • VPC peering

    Joins two VPCs so they talk over private IP addresses. One to one, and not transitive.

The parts of a VPC you are expected to know, including both ends of a VPN connection.

是什么

You divide a VPC into subnets. A subnet is a range of IP addresses in one Availability Zone, and you launch resources such as EC2 instances into it. Every subnet is linked to a route table, a set of rules that says where its traffic can go. The route table is what makes a subnet public or private.

是什么

A public subnet has a route to an internet gateway, so a load balancer or web server in it can be reached from the internet. A private subnet has no such route, so the application servers and databases in it stay out of reach. When a private server needs the internet, for example to download updates, it goes through a NAT gateway. Replies come back, but nobody outside can start a connection.

是什么

More parts connect a VPC to other networks. A virtual private gateway is the AWS end of a Site-to-Site VPN connection. The other end is a customer gateway device, such as a router or firewall in your data center. A VPC peering connection joins two VPCs, so their resources can talk to each other using private IP addresses. A VPC endpoint reaches AWS services such as Amazon S3 without going over the internet.

要记住

  • Subnet = one Availability Zone. VPC = the whole Region.
  • A route to an internet gateway is what makes a subnet public.
  • Internet gateway: connections can start from either side. NAT gateway: private resources go out, and nothing comes in uninvited.
  • Use subnets in at least two Availability Zones, so the application survives the loss of one zone.

要记住

  • Gateway endpoints reach Amazon S3 and Amazon DynamoDB at no extra charge.
  • VPC peering is not transitive. If A peers with B and B with C, A still cannot reach C.

考试中

  • “Instances in a private subnet must download updates but must not be reachable from the internet” points to a NAT gateway.
  • “What makes a subnet public?” A route in its route table to an internet gateway.
  • “Reach Amazon S3 from a private subnet without using the internet” points to a VPC endpoint.