Section 6: Virtual Private Cloud (VPC) Flashcards
What is a VPC
A Virtual Private Cloud is a logically isolated portion of the AWS cloud within a region where you can launch AWS resources (e.g. EC2 instances) in a virtual network that you define.
https://digitalcloud.training/amazon-vpc/
What is a Region
A Region is a physical location in the world. E.g. us-eat-1, eu-west-1, ap-southeast-2
Each region consists of multiple availability zones which sit inside each region.
https://aws.amazon.com/about-aws/global-infrastructure/
Availability Zones
An Availability Zone sits inside a Region.
An Availability Zone can consist of both a Public subnet and a Private subnet
Amazon encourages you to deploy your application into more than 1 availability zone for resilience.
AWS CloudFront
AWS CloudFront is a CDN
CloudFront is a good choice for distributing frequently access static data content from edge delivery (geographically closer to users). Regional Edge Cache -> Edge Location -> User.
IPv4 address
IPv4 address is the address which the server can use to read a web address.
E.g. example.com –> 192.168.0.1
Network ID = 192.168.0 (first 3 octets)
Host ID = 1 (last octet)
Regions and VPC’s
Each Region allows up to 5 VPC’s inside a region.
VPC CIDR block and subnet planning
Use tool https://www.site24x7.com/tools/ipv4-subnetcalculator.html
Network Access Control (Network ACL)
Network Access Control Lists get applied at the subnet level.
NACL’s apply only to traffic entering/exiting the subnet, filtering the traffic entering/existing
Security Group vs Network Access Control List
Security Group = statefull firewall. Allows return traffic automatically. Meaning only need to define the inbound rule, as the outbound will accept it.
Network Access Control List = stateless firewall, you have to explicitly define both outbound and inbound rule.
Rules are defined using port range, IP address or subnet group ID
Rules are processed in order, bare in mind how that impacts rules being applied
What is Virtual Private Cloud Peering?
VPC (Virtual Private Cloud) Peering is a network connection betwn two VPC’s that enable you to route traffic between them using privde IPv4 or IPv6 addresses.
CIDR blocks (10.1.0.0/16 for example) can not overlap between VPC’s.
https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html
VPC interface endpoint
VPC interface endpoint is an Elastic Network Interface (ENI). Using this you can connect your private IP address (subnet) to other AWS services like ELB, CloudFormation, SNS, S3 etc.
https://digitalcloud.training/vpc-interface-endpoint-vs-gateway-endpoint-in-aws/
Elastic Network Interface (ENI) vs Gateway Endpoint
Interface endpoint is done from within subnet/security group. Gateway endpoint is from within VPC (higher up) and uses the route table.
Interface Endpoint (Elastic Network Interface) - Interface Endpoints are powered by AWS PrivateLink, which creates a secure and private network connection between your VPC and the AWS service.
Gateway Endpoint - Gateway endpoints are route table entries that route your traffic directly from the subnet where traffic is originating to the service.
AWS Client VPN
AWS Client VPN is a managed client-based VPN service that enables you to securely access your AWS resources and resources in your on-premises network. With Client VPN, you can access your resources from any location using an OpenVPN-based VPN client.
Meaning you can allow another non-AWS servers/computers to connect securely to your AWS services
AWS Direct Connect (DX)
AWS Direct Connect makes it easy to establish a dedicated connection from an on-premises network to one or more VPCs.
AWS Direct Connect can reduce network costs, increase bandwidth throughput, and provide a more consistent network experience than internet-based connections.
Note: connections are NOT encrypted.
https://digitalcloud.training/aws-direct-connect/
https://docs.aws.amazon.com/whitepapers/latest/aws-vpc-connectivity-options/aws-direct-connect.html
AWS Direct Connect Gateway
Use AWS Direct Connect Gateway when you want to connect multiple AWS regions together with an on-prem service / another provider. This is more cost effective than just using AWS Direct Connect.
https://docs.aws.amazon.com/directconnect/latest/UserGuide/direct-connect-gateways-intro.html