AWS Networking and Content Delivery
AWS Networking and Content Delivery
IP Address
Each client machine in a network has a unique Internet Protocol (IP) address that identifies it. An IP address is a
numerical label in decimal format. Machines convert that decimal number to a binary format. In this example, the
IP address is 192.0.2.0. Each of the four dot (.)-separated numbers of the IP address represents 8 bits in octal
number format. That means each of the four numbers can be anything from 0 to 255. The combined total of the
four numbers for an IP address is 32 bits in binary format.
• IPv6 Addresses
o IPv6 addresses, which are 128 bits, are also available. IPv6 addresses can accommodate more
user devices.
o An IPv6 address is composed of eight groups of four letters and numbers that are separated by
colons (:).
o Example: 2600:1f18:22ba:8c00:ba86:a05e:a5ba:00FF.
Chapter 3
o Each of the eight colon-separated groups of the IPv6 address represents 16 bits in
hexadecimal number format.
o That means each of the eight groups can be anything from 0 to FFFF.
o The combined total of the eight groups for an IPv6 address is 128 bits in binary format.
Creating a VPC could be a very complex task, but AWS has made it easy by providing Launch VPC Wizard. The
following screenshot shows the VPC network configuration across two AZs, us-east-1a and us-east-1b:
• VPCs spread across two AZs, where each AZ has two subnets – one public and one private.
• The highlighted flow shows the data flow of a server deployed into a private subnet of the us-east-1 AZ.
Before going into further details, let’s look at key VPC concepts to understand them better:
• Subnets
• Route tables
• Internet Gateway
• Egress-only IGWs
• DHCP
Copyrighted Material
AWS Networking and Content Delivery
CIDR blocks define the IP address range allocated to your VPC. When creating a VPC, specify its set of IP
addresses with CIDR notation, which is a simplified way of showing a specific range of IP addresses. For
example, 10.0.0.0/16 covers all IPs from 10.0.0.0 to 10.0.255.255, providing 65,535 IP addresses to use. All
resources in your VPC must fall within the CIDR range.
VPC Components
Subnets
A subnet is the VPC CIDR block subset. Partitions of the network are divided by the CIDR range within the range
of IP addresses in your VPC. A VPC can have multiple subnets for different kinds of services or functions, like:
Subnets create trusted boundaries between private and public resources, organize your subnets based on
internet accessibility, and allow clear isolation between public and private resources. The majority of resources
can be hosted in private subnets.
Route Tables
A route table contains a set of rules called routes. Routes determine where the traffic will flow. By default, every
subnet has a routing table. You can manually create a new route table and assign subnets to it. For better
security, use a custom route table for each subnet.
Copyrighted Material
Chapter 3
Egress-only IGWs
Egress-only IGWs provide outbound communication from Internet Protocol version 6 (IPv6) instances in your
VPC to the internet and prevent inbound connections from the internet to your instances on IPv6. IPv6, the sixth
iteration of the Internet Protocol, succeeds IPv4 and employs a 128-bit IP address. Like IPv4, it facilitates the
provision of unique IP addresses required for internet-connected devices to communicate.
VPC Peering
A VPC peering connection is a networking connection between two VPCs that enables you to route traffic
between them privately. Instances in either VPC can communicate with each other as if they are within the same
network. You can create a VPC peering connection between your own VPCs, with a VPC in another AWS account,
or with a VPC in a different AWS Region. When setting up the peering connection, you must create rules in your
route table to allow the VPCs to communicate with each other through the peering resource.
Managing so many VPC peering connections will become challenging, and there is also a limit on the number of
peering connections per account. To overcome this challenge, AWS released TGW.
TGW needs one connection called an attachment to a VPC, and you can establish full- or partial-mesh
connectivity easily without maintaining so many peering connections.
Copyrighted Material
AWS Networking and Content Delivery
AWS Transit Gateway (TGW) is a central aggregation service spanned within a Region, which can be used to
connect your VPCs and on-premises networks. TGW is a managed service that takes care of your availability and
scalability and eliminates complex VPN or peering connection scenarios when connecting with multiple VPCs
and on-premises infrastructure.
You can connect TGWs in different Regions by using TGW peering. TGW is a regional entity, meaning you can only
attach VPCs to the TGW within the same Region, and per VPC, the bandwidth reserved is 50 Gbps. However, one
TGW can have up to 5,000 VPC attachments.
Diagram Explanation
Any new VPC is connected to the transit gateway and is then automatically available to every other network that
is connected to the transit gateway. This ease of connectivity makes it easier to scale your network as you grow.
Amazon CloudFront
Amazon CloudFront is a content delivery service that accelerates the distribution of both static and dynamic
content like image files, video files, and JavaScript, CSS, or HTML files, through a network of data centres spread
across the globe. These data centres are referred to as edge locations. CloudFront serves user requests from the
nearest edge location, providing lower latency and better performance. AWS has over 300 high-density edge
locations spread across over 90 cities in 47 countries. All edge locations are equipped with ample cache storage
space and intelligent routing mechanisms to increase the edge cache hit ratio.
Edge locations are connected with high-performance 100 GbE network devices and are fully redundant, with
parallel global networks with default physical layer encryption.
Example Scenario: Consider an image distribution website, www.example.com, hosted in the US, which serves
art images. Users can access the URL www.example.com/art.png, and the image is loaded. If your server is close
to the user, then the image load time will be faster. However, if users from other locations like Australia or South
Africa access the same URL, the request has to cross multiple networks before delivering the content to the
user’s browser.
o If the requested content is already in the edge data centre, which means it is a “cache hit,” it
will be served immediately.
Copyrighted Material
Chapter 3
o If the content is not at the edge location (a “cache miss”), CloudFront will request the content
from the original location (the web server or S3). The request flows through the AWS backbone,
is delivered to the customer, and a copy is kept for future requests.
o If you are using CloudFront, it also provides an extra layer of security since your origin server is
not directly exposed to the public network.
• CloudFront provides security by safeguarding the connection between end-users and the content edge,
as well as between the edge network and the origin.
• By offloading SSL termination to CloudFront, the performance of applications is improved since the
burden of processing the required negotiation and SSL handshakes is removed from the origins.
As you grow the number of workloads that run on AWS, you must be able to scale your networks across multiple
accounts and VPCs to keep up with the growth. Though you can use VPC peering to connect pairs of VPCs,
managing point-to-point connectivity across many VPCs without the ability to centrally manage the connectivity
policies can be operationally costly and difficult. For on-premises connectivity, you must attach your VPN to each
individual VPC. This solution can be time-consuming to build and difficult to manage when the number of VPCs
grows into the hundreds.
To solve this problem, you can use AWS Transit Gateway to simplify your networking model. With AWS Transit
Gateway, you only need to create and manage a single connection from the central gateway into each VPC, on-
premises data centre, or remote office across your network. A transit gateway acts as a hub that controls how
traffic is routed among all the connected networks, which act like spokes. This hub-and-spoke model
significantly simplifies management and reduces operational costs because each network only needs to connect
to the transit gateway and not to every other network.
• This ease of connectivity makes it easier to scale your network as you grow.
Additional Features:
• AWS TGW is a central aggregation service spanned within a Region, which can be used to connect your
VPCs and on-premises networks.
Copyrighted Material
AWS Networking and Content Delivery
• TGW is a managed service that takes care of your availability and scalability and eliminates complex
VPN or peering connection scenarios when connecting with multiple VPCs and on-premises
infrastructure.
• TGW is a regional entity, meaning you can only attach VPCs to the TGW within the same Region, and per
VPC, the bandwidth reserved is 50 Gbps.
Diagram Explanation
Any new VPC is connected to the transit gateway and is then automatically available to every other network that
is connected to the transit gateway. This ease of connectivity makes it easier to scale your network as you grow.
Amazon CloudFront
Content Distribution Rules
When a viewer requests access to page content from the origin server – in this case, www.example.com – Route
53 replies with the CloudFront edge IP and redirects the user to the CloudFront location. CloudFront uses the
following rules for content distribution:
• Cache Hit: If the requested content is already in the edge data centre, it will be served immediately.
• Cache Miss: If the content is not at the edge location, CloudFront will request the content from the
original location (the web server or S3). The request flows through the AWS backbone, is delivered to the
customer, and a copy is kept for future requests.
Security Enhancements
If you are using CloudFront, it also provides an extra layer of security since your origin server is not directly
exposed to the public network. CloudFront eliminates the need to go to the origin server for user requests, and
content is served from the nearest location. CloudFront provides security by safeguarding the connection
between end-users and the content edge, as well as between the edge network and the origin. By offloading SSL
termination to CloudFront, the performance of applications is improved since the burden of processing the
required negotiation and SSL handshakes is removed from the origins.
Conclusion
This module establishes a strong foundation in AWS Networking and Content Delivery, covering essential
services and concepts such as Amazon VPC, Subnets, Route Tables, Security Groups, VPC Peering, AWS
Transit Gateway, AWS Direct Connect, and Amazon CloudFront. Understanding these components enables
you to build scalable, secure, and efficient cloud networks tailored to your organization's needs.
Copyrighted Material