Easy ReviewCLF-C02
Cloud Technology and Services18

VPC

Route private network traffic, control access, and investigate connections with VPC Flow Logs.

Este conteúdo de estudo ainda não foi traduzido, então aparece em inglês. Ajude a traduzir

VPC networking combines routes that select paths, security groups and ACLs that control traffic, and endpoints that reach supported services privately. Flow Logs supply connection records for diagnosis and auditing.

Subnets and gateways

Amazon VPC is your own isolated network in AWS. Inside it, subnetsAn address range within a VPC whose traffic follows an associated route table. split the address range by Availability Zone, route tables steer traffic, and gateways connect the VPC to the internet, other networks or AWS services.

How it works

  1. Create a VPC with an IP address range in a Region.
  2. Add subnets, each in one Availability Zone. Use at least two AZs for high availability.
  3. Attach an internet gateway and route public subnets to it.
  4. Keep most resources in private subnets; give them outbound internet access through a NATTranslation of source addresses so private resources can initiate connections through a gateway. gateway.
  5. Reach AWS services privately with VPC endpoints, other VPCs with peeringA direct private routing relationship between two VPCs. or a transit gateway, and on-premises networks with a VPN or Direct Connect.
Component Purpose
Subnet IP range in one AZ, public or private
Route tableA set of destination and target rules that directs network traffic. Where traffic from a subnet goes
Internet gateway Two-way internet access for public subnets
NAT gateway Outbound-only internet access for private subnets
Virtual private gateway VPN connection to an on-premises network
VPC endpoint Private access to AWS services
Peering, transit gateway Connect VPCs to each other

Exam cues

  • If the question says web servers reachable from the internet, think public subnet with an internet gateway, public addresses and permitted security rules, because a gateway alone does not allow traffic.
  • If the question says databases must not be reachable from the internet, think private subnet.
  • If the question says private instances need outbound internet only, think NAT gateway.

Remember

  • A subnet lives in exactly one AZ.
  • AWS recommends private subnets to protect resources.
  • NAT gateway: managed by AWS. NAT instance: you manage it.

Trap: An internet gateway alone doesn’t make an instance reachable. The subnet needs a route to it, the instance needs a public IPv4 or public IPv6 address, and security controls must permit the traffic.

Da documentação da AWS (18)
  • Amazon VPC launches AWS resources in a logically isolated virtual network that you define, closely resembling a traditional data center network.
  • A subnet is a range of IP addresses in a VPC and must reside in a single Availability Zone.
  • Route tables determine where network traffic from a subnet or gateway is directed.
  • A public subnet has a direct route to an internet gateway; a private subnet doesn't, and its resources need a NAT device to reach the internet.
  • A VPN-only subnet has a route to a Site-to-Site VPN connection through a virtual private gateway and no route to an internet gateway.
  • AWS recommends private subnets to protect AWS resources.
  • An internet gateway is a redundant, highly available VPC component for internet communication. Resources need a public IPv4 or public IPv6 address, an appropriate subnet route, and security controls that allow the traffic.
  • A NAT gateway lets instances in a private subnet connect to services outside the VPC while external services can't initiate connections to them; a public NAT gateway sits in a public subnet with an Elastic IP address.
  • A VPC endpoint connects a VPC to AWS services privately, without an internet gateway or NAT device.
  • A VPC peering connection routes traffic between two VPCs, and a transit gateway acts as a central hub routing traffic between VPCs, VPN connections and AWS Direct Connect connections.
  • A NAT gateway is managed by AWS with no maintenance; a NAT instance is an EC2 instance the customer manages, including patching.
  • A VPC belongs to one Region and can have subnets in each of its Availability Zones; each subnet stays in one Availability Zone.
  • AWS initially provides a default VPC in each Region with public default subnets, an internet gateway and DNS resolution enabled.
  • Default quotas allow 5 VPCs per Region and 5 IPv4 CIDR blocks per VPC (adjustable to 50), and only one internet gateway can be attached to a VPC at a time.
  • A subnet is public when its route table sends 0.0.0.0/0 (or ::/0) to the internet gateway, or a narrower range of public addresses.
  • Gateway endpoints provide S3 and DynamoDB connectivity without an internet gateway or NAT, do not use PrivateLink, and have no additional endpoint charge.
  • A gateway endpoint adds a service prefix-list route to associated route tables. Clients reach the service public endpoint through that route, so the endpoint uses route-table associations rather than network interfaces placed in each subnet.
  • Gateway prefix lists are Region-specific, so the endpoint route applies to the service in that Region rather than another Region.

VPC security basics

A VPC has two built-in network filters: security groups around instances and network ACLsA numbered set of allow and deny rules for traffic entering or leaving a subnet. around subnetsAn address range within a VPC whose traffic follows an associated route table..

How it works

  1. Traffic entering a subnet passes its network ACL.
  2. Traffic reaching an instance passes its security group.
  3. Security groups let responses back automatically; network ACLs need rules both ways.

Exam cues

  • If the question says instance-level firewall, think security group.
  • If the question says subnet-level allow and deny rules, think network ACL.

Remember

  • Security group: instance level, statefulFiltering that remembers allowed connections and permits their response traffic..
  • Network ACL: subnet level, allow and deny.

Trap: Security groups cannot deny a specific address; use a network ACL for an explicit deny.

Da documentação da AWS (14)
  • A security group acts as a virtual firewall for an instance: only traffic its rules allow reaches it, and it is stateful, so responses are allowed back automatically.
  • A network ACL allows or denies inbound and outbound traffic at the subnet level.
  • Flow logs can cover a VPC, subnet, or network interface; VPC and subnet logs monitor their network interfaces.
  • VPC Flow Logs publish to CloudWatch Logs, S3, or Data Firehose.
  • Flow records include source and destination addresses and ports, protocol, packet and byte counts, timestamps, action, and logging status.
  • VPC Flow Logs do not capture packet contents.
  • Flow log collection occurs outside the network traffic path and does not affect its throughput or latency.
  • Security groups control allowed inbound and outbound traffic for associated resources and their network interfaces.
  • Security groups track connections and automatically allow response traffic for allowed requests regardless of opposite-direction rules.
  • Security groups have allow rules only; rules across multiple attached groups combine into one set of permissions.
  • Each VPC subnet has one network ACL, and one ACL can serve multiple subnets. Creating a custom ACL does not attach it to a subnet; associate it explicitly to apply its rules.
  • Network ACLs do not track connections. Traffic between subnets must pass the source outbound and destination inbound rules; replies must pass both subnet ACLs in the reverse direction.
  • ACL rules allow or deny traffic in ascending rule-number order; the first match wins, and numbered rules range from 1 to 32766.
  • A security group rule source or destination is an IPv4 or IPv6 CIDR range, a single address written as a /32 or /128, a prefix list ID, or another security group; an internet gateway ID is not a valid source.

Flashcards

toque para virar
Resposta

·

Todos os 18 flashcards em lista

What is an Amazon VPC subnet, and how many Availability Zones can one subnet span?

A range of IP addresses in the VPC. It lives in exactly one Availability Zone.

What makes a VPC subnet public rather than private?

A public subnet has a route to an internet gateway; a private subnet doesn't.

Instances in a private subnet must download patches from the internet but must not accept incoming connections. What should the company add?

A NAT gateway in a public subnet, with a route from the private subnet to it.

Which VPC component allows two-way communication between a VPC and the internet?

An internet gateway.

How can instances in a private subnet reach Amazon S3 without going through the internet?

Through a VPC endpoint, which connects to AWS services privately without an internet gateway or NAT.

Does a NAT gateway let people on the internet connect to instances in a private subnet?

No. It allows outbound connections only; external services can't initiate connections through it.

Which VPC component directs traffic from a subnet to a gateway or another network?

A route table.

A company wants private subnets to reach the internet through NAT with no instances to patch. Should it use a NAT gateway or a NAT instance?

A NAT gateway, which AWS manages. A NAT instance is an EC2 instance the customer must patch and maintain.

Can one Amazon VPC span several AWS Regions or several Availability Zones?

Only several Availability Zones. A VPC is in one Region and can have subnets in each of its AZs; each subnet is in one AZ.

What is the purpose of an internet gateway in Amazon VPC?

An internet gateway connects a VPC to the internet. Resources also need a public IPv4 or public IPv6 address, a route to the gateway and security controls that permit traffic.

What makes a subnet public?

Its route table sends 0.0.0.0/0 (or ::/0) to an internet gateway.

How does a VPC gateway endpoint provide private S3 or DynamoDB access?

It adds an AWS-managed service prefix-list route to associated route tables. No internet gateway or NAT is required, and there is no additional endpoint charge. The service prefix list is Region-specific.

What does a security group do in an Amazon VPC?

A security group acts as a virtual firewall for an instance and controls which traffic can reach it.

Which Amazon VPC security control allows or denies traffic at the subnet level?

A network ACL controls inbound and outbound traffic at the subnet level.

What do VPC Flow Logs record, and where can the records be published?

IP traffic metadata such as addresses, ports, protocol, bytes, and ACCEPT or REJECT, at VPC, subnet, or network-interface scope. Publish to CloudWatch Logs, S3, or Data Firehose. Packet contents are not captured, and collection is outside the traffic path.

How do VPC security groups and network ACLs differ?

Security groups protect associated resources, track connections, and have allow rules only. Network ACLs protect subnets, do not track connections, and process allow or deny rules from lowest number to first match. A subnet has one ACL.

Which of these cannot be the source of a security group inbound rule: a CIDR block, a single IP, another security group, or an internet gateway ID?

An internet gateway ID. Sources are CIDR ranges (including single addresses), prefix lists and security groups.

A team creates a custom Amazon VPC network ACL but does not associate a subnet. Do its rules affect an existing subnet?

No. Associate the custom ACL with the subnet to apply its rules; creation alone changes no subnet association.

Você concluiu todos os tópicos da CLF-C02!

Seu badge ficou dourado. Próximo passo: agendar a prova na AWS. Depois de passar, adicione-se ao Quem passou.

Compartilhar

Conte que você concluiu esta certificação

Concluí todos os tópicos da AWS Certified Cloud Practitioner (CLF-C02) no Easy Review. Venha estudar também!