SlideShare a Scribd company logo
1 of 199
© Digital Cloud Training | https://digitalcloud.training
SECTION 6
Hybrid Connectivity
© Digital Cloud Training | https://digitalcloud.training
AWS Client VPN
© Digital Cloud Training | https://digitalcloud.training
AWS Client VPN
Region
VPC – CIDR 10.0.0.0/16
Private subnet – 10.0.5.0/24
Public subnet – 10.0.1.0/24
EC2 Instance
CIDR 10.1.0.0/22
– performs SNAT
to 10.0.0.0/16
VPN
Endpoint
VPN
VPN client connects
over SSL/TLS (443)
Client VPN
network interfaces
created in subnet
Destination Gateway
10.0.0.0/16 10.1.1.X
Local route of associated
subnet is added to client
route table
Assoc.
Assoc.
10.0.5.12
10.0.1.15
© Digital Cloud Training | https://digitalcloud.training
Deploy AWS Client VPN
© Digital Cloud Training | https://digitalcloud.training
AWS Client VPN – Hands-On
Region
VPC – CIDR 10.0.0.0/16
Private subnet – 10.0.5.0/24
Public subnet – 10.0.1.0/24
EC2 Instance
VPN
Endpoint
VPN
Assoc.
Assoc.
10.0.5.12
10.0.1.15
Amazon Workspaces
Region
© Digital Cloud Training | https://digitalcloud.training
AWS Site-to-Site VPN
© Digital Cloud Training | https://digitalcloud.training
AWS Site-to-Site VPN
VPC
Private subnet
Public subnet
Customer
gateway
VPN connection
Virtual Private
Gateway (VGW)
Corporate data center
Destination Target
192.168.0.0/16 vgw-id
Route Table
CIDR: 10.0.0.0/16
CIDR: 192.168.0.0/16
A customer gateway is
deployed on the
customer side
A VGW is
deployed on
the AWS site
Route table points
to the VGW
Supports static routes
or BGP peering/routing
AWS VPN is a managed
IPSec VPN
© Digital Cloud Training | https://digitalcloud.training
Deploy AWS Site-to-Site VPN
© Digital Cloud Training | https://digitalcloud.training
AWS Site-to-Site VPN – Hands-On
VPC
Public subnet
VPN connection
Virtual Private
Gateway (VGW)
On-Premises DC
Destination Target
10.0.0.0/16 openswan-instance-id
Route Table
CIDR: 10.0.0.0/16
CIDR: 172.31.0.0/16
Use the PRODUCTION
account for the on-
premises DC
Use the MANAGEMENT
account for the AWS
VPC
Virtual Private Gateway Propagate
vgw-id Yes
Route Table
OpenSwan /
CGW
Internal Server
EC2 Instance
Ping Instance in AWS VPC
from internal server using
its private IP
© Digital Cloud Training | https://digitalcloud.training
AWS VPN CloudHub
© Digital Cloud Training | https://digitalcloud.training
AWS VPN CloudHub
VPC
Private subnet
Public subnet
Virtual Private
Gateway (VGW)
Customer office
Customer office
Customer office
Customer gateway
ASN: 6500
Network traffic
Network traffic
A VGW is
deployed on
the AWS site
Remote offices
connect to the
VGW in a hub-and-
spoke model
Network traffic may
go between a VPC
and a remote office
Network traffic
between offices can
also be routed over
the IPSec VPN
Each office must use
a unique BGP ASN
Customer gateway
ASN: 6501
Customer gateway
ASN: 6502
© Digital Cloud Training | https://digitalcloud.training
AWS Direct Connect (DX)
© Digital Cloud Training | https://digitalcloud.training
AWS Direct Connect (DX)
Corporate data center
AWS Direct Connect location
AWS Cloud
AWS cage Customer /
partner cage
AWS Direct
Connect
endpoint
Customer /
partner router
Region
A DX port (1000-Base-LX or
10GBASE-LR) must be
allocated in a DX location
A cross-connect between
the AWS DX router and the
customer/partner DX
router
Customer
Router
The customer
router is connected
to the DX router in
the DX location
VPC
Private subnet
Public subnet
DX is a physical fibre
connection to AWS running
at 1Gbps or 10Gbps
© Digital Cloud Training | https://digitalcloud.training
AWS Direct Connect Benefits
• Private connectivity between AWS and your
data center / office
• Consistent network experience – increased
speed/latency & bandwidth/throughput
• Lower costs for organizations that transfer
large volumes of data
© Digital Cloud Training | https://digitalcloud.training
AWS Direct Connect (DX)
VPC
Corporate data center
AWS Direct Connect location
AWS Cloud
AWS cage Customer /
partner cage
Region
Amazon S3
Amazon DynamoDB Amazon CloudFront
Private subnet
Public subnet
A VIF is a virtual interface
(802.1Q VLAN) and a BGP
session
A Private VIF connects to a
single VPC in the same AWS
Region using a VGW
A Public VIF can be used to
connect to AWS Public services in
any Region (but not the Internet)
AWS Direct
Connect
endpoint
Customer /
partner router
VGW
Private VIF
Public VIF
Customer
Router
© Digital Cloud Training | https://digitalcloud.training
AWS Direct Connect (DX)
VPC
Corporate data center
AWS Direct Connect location
AWS Cloud
AWS cage Customer /
partner cage
Region
AWS Direct
Connect
endpoint
Customer /
partner router
VGW
VPC
VPC
VGW
VGW
VIFs can also be shared with
other AWS accounts –
known as hosted VIFs
Multiple Private
VIFs can be used to
connect to multiple
VPCs in the Region
Customer
Router
© Digital Cloud Training | https://digitalcloud.training
AWS Direct Connect (DX)
• Speeds from 50Mbps to 500Mbps can also be accessed via
an APN partner (uses hosted VIFs or hosted connections):
• A hosted VIF is a single VIF that is shared with other customers
(shared bandwidth)
• A hosted connection is a DX connection with a single VIF dedicated
to you
• DX Connections are NOT encrypted!
• Use an IPSec S2S VPN connection over a VIF to add
encryption in transit
• Link aggregation groups (LAGs) can be used to combine
multiple physical connections into a single logical connection
using LACP – provides improved speed
© Digital Cloud Training | https://digitalcloud.training
DX - Native High Availability
Corporate data center
AWS Direct Connect location
Region
DX Locations are
connected by
redundant
connections
Corporate data center
AWS Direct Connect location
Multiple DX Locations exist in
metropolitan areas where
AWS has Regions
Cables may share
the same pathways
= Single Point of Failure
© Digital Cloud Training | https://digitalcloud.training
Direct Connect + IPSec S2S VPN
Corporate data center
AWS Direct Connect location
Region
Internet
DX
VGW
The DX connection
is the primary
active path
An IPSec S2S VPN is
the backup path
This architecture is NOT
recommended for
speeds above 1Gbps
Multiple SPOFs exist in
this architecture, add
redundancy to eliminate
© Digital Cloud Training | https://digitalcloud.training
Create Direct Connect
Connection
© Digital Cloud Training | https://digitalcloud.training
AWS Direct Connect Gateway
© Digital Cloud Training | https://digitalcloud.training
Direct Connect - Multiple Regions
Region – us-west-1
DX Location - Europe
Corporate office
DX Location - US
Region eu-central-1
AWS Cloud
Private VIF
Private VIF
A Private VIF connects to a
single VPC in the same
AWS Region using a VGW
VGW
VGW
DX is a regional service so multiple
DX locations must be used
Requires regional
offices or long distance
(expensive) links
Example architecture without AWS
Direct Connect Gateway
© Digital Cloud Training | https://digitalcloud.training
Direct Connect - Multiple Regions
Region – us-west-1
Corporate office
DX Location - US
Region eu-central-1
AWS Cloud
Private VIF
The DX Gateway is
associated with a VGW
VGW
VGW
A Private VIF is
associated with
the DX Gateway
BGP advertises a
route to all VPCs via
the DX Gateway
DX Gateway
Example architecture with AWS Direct
Connect Gateway
© Digital Cloud Training | https://digitalcloud.training
Direct Connect - Multiple Regions
Region – us-west-1
Corporate office
DX Location - US
Region eu-central-1
AWS Cloud
Private VIF
VGW
VGW
DX Gateway does
not allow VGWs
to send traffic to
each other
Network traffic can be
routed from on-
premises to any VPC
DX Gateway
Example architecture with AWS Direct
Connect Gateway
Network traffic
© Digital Cloud Training | https://digitalcloud.training
AWS Transit Gateway
© Digital Cloud Training | https://digitalcloud.training
AWS Transit Gateway
VPC A VPC B
VPC C VPC D
Example full mesh architecture without
AWS Transit Gateway
6 VPC Peering
connections
IPSec VPN
IPSec VPN
IPSec VPN
IPSec VPN
CGW
VGW
VGW
VGW VGW
4 S2S VPN
connections
Corporate office
To make this
architecture redundant
add another CGW and
double the number of
S2S VPN connections!
© Digital Cloud Training | https://digitalcloud.training
AWS Transit Gateway
VPC A VPC B
VPC C VPC D
Example full mesh architecture with
AWS Transit Gateway
CGW
Transit Gateway is a network
transit hub that interconnects
VPCs and on-premises networks
Corporate office
Subnet
Subnet
Subnet
Subnet
Subnet
Subnet
Subnet
Subnet
Specify one subnet
from each AZ to
enable routing
within the AZ
VPCs are attached
to Transit Gateway
TGWs can be attached to
VPNs, Direct Connect
Gateways, 3rd party
appliances and TGWs in
other Regions/accounts
© Digital Cloud Training | https://digitalcloud.training
AWS TGW + DX Gateway
VPC A VPC B
VPC C VPC D
This architecture supports full transitive
routing between on-premises, TGW and VPCs
Corporate office
Subnet
Subnet
Subnet
Subnet
Subnet
Subnet
Subnet
Subnet
AWS cage Customer /
partner cage
AWS Direct
Connect
endpoint
Customer /
partner router
Transit VIF
Customer
Router
DX Gateway
DX Gateway is
associated with the TGW
A Transit VIF is used
when attaching via a DX
Gateway to a TGW
© Digital Cloud Training | https://digitalcloud.training
SECTION 7
Compute, Auto Scaling, and Load Balancing
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Pricing Options
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Pricing Options
Reserved
Spot Instances Dedicated Instances
Dedicated Hosts
On-Demand
Savings Plans
Standard rate - no discount; no
commitments; dev/test, short-term, or
unpredictable workloads
1 or 3-year commitment;
up to 75% discount; steady-state,
predictable workloads and reserved capacity
Bid for unused capacity; up to 90% discount;
can be terminated at any time; workloads
with flexible start and end times
Physical isolation at the host hardware level
from instances belonging to other
customers; pay per instance
Commitment to a consistent amount of
usage (EC2 + Fargate + Lambda); Pay by
$/hour; 1 or 3-year commitment
Physical server dedicated for your use;
Socket/core visibility, host affinity; pay per
host; workloads with server-bound software
licenses
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Billing
Billed per hour;
Minimum of 1 hour
Billed per second;
Minimum of 1 minute
Volumes billed per second;
Minimum of 1 minute
Per-second billing is for
Amazon Linux and
Ubuntu in On-Demand,
Reserved, and Spot forms
Commercial Linux distros
such as Red Hat EL and SUSE
ES use hourly pricing
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Reserved Instances (RIs)
Standard RI Convertible RI
Change AZ,
instance size (Linux),
networking type
Change AZ,
instance size (Linux),
networking type
+
Change family, OS,
tenancy, payment option
Use ModifyReservedInstances API
Use ExchangeReservedInstances API
Term is 1 or 3 years
Can pay All Upfront, Partial
Upfront, No Upfront
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Reserved Instances (RIs)
When the attributes of a used instance
match the attributes of an RI the
discount is applied
Tenancy: Default or Dedicated
Availability Zone Region
Reserves capacity
in specified AZ
Does not reserve
capacity; discount
applies to all AZs
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Reserved Instances (RIs)
Scheduled RI
• Match capacity reservation to
recurring schedule
• Minimum 1200 hours per year
• Example: Reporting app that runs 6
hours a day 4 days a week = 1248
hours per year
This message started showing
recently but exam may not
reflect this yet
© Digital Cloud Training | https://digitalcloud.training
AWS Savings Plans
Compute Savings Plan EC2 Savings Plan
1 or 3-year; hourly
commitment to usage of
Fargate, Lambda, and
EC2; Any Region, family,
size, tenancy, and OS
1 or 3-year; hourly
commitment to usage of
EC2 within a selected
Region and Instance
Family; Any size, tenancy
and OS
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Spot Instances
Spot Fleet: launches and maintains the number of
Spot / On-Demand instances to meet specified
target capacity
Bid for unused capacity at up
to 90% discount
Spot Instance: One or more EC2 instances
EC2 Fleet: launches and maintains specified
number of Spot / On-Demand / Reserved
instances in a single API call
Can define separate OD/Spot
capacity targets, bids, instance
types, and AZs
2-minute warning if AWS
need to reclaim capacity –
available via instance
metadata and CloudWatch
Events
© Digital Cloud Training | https://digitalcloud.training
Spot Block
Requirement:
Uninterrupted for
1-6 hours
Solution: Spot Block
Pricing is 30% - 45% less
than On-Demand
© Digital Cloud Training | https://digitalcloud.training
Dedicated Instances and Dedicated Hosts
Characteristic Dedicated Instances Dedicated Hosts
Enables the use of dedicated physical servers X X
Per instance billing (subject to a $2 per region fee) X
Per host billing X
Visibility of sockets, cores, host ID X
Affinity between a host and instance X
Targeted instance placement X
Automatic instance placement X X
Add capacity using an allocation request X
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Pricing Use
Cases
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Pricing Use Cases
Developer working on a small
project for several hours;
cannot be interrupted
Reserved
Scheduled Reserved
Spot Instances
Dedicated Instances
Dedicated Hosts
On-Demand
Compute-intensive, cost-
sensitive distributed
computing; can withstand
interruption
Steady-state, business critical,
line-of-business application;
continuous demand
© Digital Cloud Training | https://digitalcloud.training
Amazon EC2 Pricing Use Cases
Reporting application, runs for
6 hours a day, 4 days per week
Reserved
Scheduled Reserved
Spot Instances
Dedicated Instances
Dedicated Hosts
On-Demand
Database with per-socket
licensing
Security-sensitive application,
requires dedicated hardware;
per-instance billing
© Digital Cloud Training | https://digitalcloud.training
Bootstrapping AMIs
© Digital Cloud Training | https://digitalcloud.training
AMIs and Bootstrapping
How can we launch our EC2 instances and install
dependencies, applications, software and security
updates, and configure customizations quickly?
© Digital Cloud Training | https://digitalcloud.training
Customized AMIs
Linux Microsoft
Windows
EC2 Instance
EBS Snapshot
Family Type vCPUs Memory
(GiB)
General purpose t2.micro 1 1
Compute optimized c5n.large 2 5.25
Memory optimized r5ad.large 2 16
Storage optimized d2.xlarge 4 30.5
GPU instances g2.2xlarge 8 15
Select an instance type
Amazon Machine
Image (AMI)
• OS Customizations
• Application Dependencies
• Application and Configuration
• Software and Security updates
Customized AMI
© Digital Cloud Training | https://digitalcloud.training
User Data
EC2 Instance
Amazon Machine
Image (AMI)
• OS Customizations
• Application Dependencies
• Application and Configuration
• Software and Security updates
User Data (script)
A combined approach would use a
customized AMI + User Data
© Digital Cloud Training | https://digitalcloud.training
Automation and Configuration Management Tools
Use automation and configuration tools
• AWS CloudFormation
• AWS OpsWorks
• AWS Systems Manager
• AWS CodePipeline, CodeDeploy etc.
• Chef and Puppet
• Jenkins
© Digital Cloud Training | https://digitalcloud.training
EC2 Placement Group Use
Cases
© Digital Cloud Training | https://digitalcloud.training
EC2 Placement Groups
 Cluster – packs instances close together inside an Availability Zone. This strategy enables
workloads to achieve the low-latency network performance necessary for tightly-coupled
node-to-node communication that is typical of HPC applications
 Partition – spreads your instances across logical partitions such that groups of instances in
one partition do not share the underlying hardware with groups of instances in different
partitions. This strategy is typically used by large distributed and replicated workloads, such
as Hadoop, Cassandra, and Kafka
 Spread – strictly places a small group of instances across distinct underlying hardware to
reduce correlated failures
© Digital Cloud Training | https://digitalcloud.training
Cluster Placement Group
Region
VPC
Availability Zone
EC2 Instances
Cluster Placement Group
Uses enhanced networking,
low network latency and high
throughput for inter-instance
traffic
© Digital Cloud Training | https://digitalcloud.training
Partition Placement Group
Region
VPC
Availability Zone
EC2 Instances
Partition 1
EC2 Instances
Partition 2
Availability Zone
EC2 Instances
Partition 3
Each partition is located on a
separate AWS rack
Partitions can be in
multiple AZs
(up to 7 per AZ)
© Digital Cloud Training | https://digitalcloud.training
Spread Placement Group
Region
VPC
Availability Zone Availability Zone
Each instance is located on a
separate AWS rack
© Digital Cloud Training | https://digitalcloud.training
EC2 Placement Group Use Cases
Tightly-coupled application that
requires low-latency, high
throughput network traffic
between instances
Partition
Spread
Cluster
Distributed and replicated
NoSQL database; requires
separate hardware for node
groups
Small number of critical
instances that should be kept
separate from each other
© Digital Cloud Training | https://digitalcloud.training
Network Interfaces (ENI, ENA,
EFA)
© Digital Cloud Training | https://digitalcloud.training
Public subnet
Network Interfaces (ENI, ENA, EFA)
eth0
Private subnet
eth1
Availability Zone
EC2 Instance
Availability Zone
Public subnet
Private subnet
172.31.15.89
52.63.195.113
The primary network
interface has a private IP
and optionally a public IP
Additional ENIs can be
attached from subnets
within the same AZ
You cannot attach
ENIs from subnets in
different AZs
© Digital Cloud Training | https://digitalcloud.training
Network Interfaces (ENI, ENA, EFA)
Elastic network
interface
Elastic network
adapter
Elastic Fabric
Adapter
• Basic adapter type for when you
don’t have any high-performance
requirements
• Can use with all instance types
• Enhanced networking
performance
• Higher bandwidth and lower
inter-instance latency
• Must choose supported instance
type
• Use with High Performance
Computing and MPI and ML use
cases
• Tightly coupled applications
• Can use with all instance types
© Digital Cloud Training | https://digitalcloud.training
Working with ENIs
© Digital Cloud Training | https://digitalcloud.training
Public, Private and Elastic IP
Addresses
© Digital Cloud Training | https://digitalcloud.training
Public subnet
Public, Private and Elastic IP Addresses
Public subnet
eth0
eth1
Availability Zone
EC2 Instance
172.31.15.89
52.63.195.113
A public IP address is a
dynamic address
AWS Account
172.31.55.108
Elastic IP
54.66.202.9
An Elastic IP address is
a static address
© Digital Cloud Training | https://digitalcloud.training
Public subnet
Public, Private and Elastic IP Addresses
Public subnet
eth0
eth1
Availability Zone
EC2 Instance
172.31.15.89
52.63.195.113
AWS Account
172.31.55.108
54.66.202.9
EC2 Instance
Both ENIs and EIPs can
be remapped to a
different instance
eth0
© Digital Cloud Training | https://digitalcloud.training
Public subnet
Public, Private and Elastic IP Addresses
Public subnet
eth0
eth1
Availability Zone
EC2 Instance
AWS Account
172.31.55.108
54.66.202.9
EC2 Instance
Public subnet Public subnet
eth0
Availability Zone
eth1
EIPs can be remapped
across AZs
© Digital Cloud Training | https://digitalcloud.training
Public, Private and Elastic IP addresses
Name Description
Public IP address Lost when the instance is stopped
Used in Public Subnets
No charge
Associated with a private IP address on the instance
Cannot be moved between instances
Private IP address Retained when the instance is stopped
Used in Public and Private Subnets
Elastic IP address Static Public IP address
You are charged if not used
Associated with a private IP address on the instance
Can be moved between instances and Elastic Network Adapters
© Digital Cloud Training | https://digitalcloud.training
NAT for Public Addresses
© Digital Cloud Training | https://digitalcloud.training
NAT for Public Addresses
Public / Elastic Internet
gateway
Association
IGW performs
1:1 NAT
eth0
172.31.32.63
3.104.75.244
Src: 54.23.86.101 Dest: 172.31.32.63
The Internet Gateway
performs NAT
Src: 54.23.86.101 Dest: 3.104.75.244
Src: 172.31.32.63 Dest: 54.23.86.101
Src: 3.104.75.244 Dest: 54.23.86.101
© Digital Cloud Training | https://digitalcloud.training
Working with EC2 IP
addresses
© Digital Cloud Training | https://digitalcloud.training
Advanced Auto Scaling
© Digital Cloud Training | https://digitalcloud.training
Refresher: Auto Scaling Basics
Availability Zone
Public subnet
Availability Zone
Public subnet
Auto Scaling group
Metrics Metrics
EC2 Instances EC2 Instances
Metric reports
CPU > 80% Amazon CloudWatch
CloudWatch
notifies Auto
Scaling to scale
Auto Scaling
launches extra
instance
EC2 Status
Checks fail
ASG replaces
failed instance
© Digital Cloud Training | https://digitalcloud.training
Dynamic Scaling – Target Tracking
Availability Zone
Public subnet
Availability Zone
Public subnet
Auto Scaling group
Metrics Metrics
Amazon CloudWatch
ASGAverageCPUUtilization = 60%
67 52 56 65
Average CPU = 60%
© Digital Cloud Training | https://digitalcloud.training
Dynamic Scaling – Target Tracking
Availability Zone
Public subnet
Availability Zone
Public subnet
Auto Scaling group
Metrics Metrics
Amazon CloudWatch
ASGAverageCPUUtilization = 60%
67 74 65
Average CPU = 71.5%
80
Instance metrics are not
counted until warm-up
time has expired
AWS recommend
scaling on metrics with
a 1-minute frequency
© Digital Cloud Training | https://digitalcloud.training
Dynamic Scaling – Target Tracking
Metrics:
• ASGAverageCPUUtilization—Average CPU utilization of the Auto
Scaling group
• ASGAverageNetworkIn—Average number of bytes received on all
network interfaces by the Auto Scaling group
• ASGAverageNetworkOut—Average number of bytes sent out on all
network interfaces by the Auto Scaling group
• ALBRequestCountPerTarget—Number of requests completed per
target in an Application Load Balancer target group
© Digital Cloud Training | https://digitalcloud.training
Dynamic Scaling – Target Tracking with SQS
Auto Scaling
group
App: AWS CLI/SDK
Reads capacity
Reads SQS metric
ApproximateNumberOfMessages = 1000
Launch instances to
process backlog in SQS
queue
SQS Queue
Emits custom
metric
© Digital Cloud Training | https://digitalcloud.training
Dynamic Scaling – Simple Scaling
Auto Scaling
group
CPU = 70%
Launch 2 instances
Alarm set to CPU >= 60%
Wait 300 seconds before allowing
another scaling activity
© Digital Cloud Training | https://digitalcloud.training
Dynamic Scaling – Step Scaling
Auto Scaling
group
CPU = 70%
Launch 2 instances
Alarm set to CPU >= 60%
Auto Scaling
group
CPU = 80%
Launch 4 instances
Alarm set to CPU >= 60%
© Digital Cloud Training | https://digitalcloud.training
Scheduled Scaling
Auto Scaling
group
Launch X instances
Schedule set to scale
daily at 08:45
Attempts to maintain desired count ->
The minimum instances running at any time ->
The maximum instances that can run ->
© Digital Cloud Training | https://digitalcloud.training
Scaling Processes
• Launch – Adds a new EC2 instance to an Auto Scaling group
• Terminate – Removes an EC2 instance from the group
• AddToLoadBalancer – Adds instances to an attached ELB or TG
• AlarmNotification – Accepts notifications from CloudWatch alarms that
are associated with the group's scaling policies
• AZRebalance – Balances the number of EC2 instances in the group
evenly across all of the specified Availability Zones
• HealthCheck – Checks the health of the instances and marks an instance
as unhealthy if Amazon EC2 or Elastic Load Balancing tells Amazon EC2
Auto Scaling that the instance is unhealthy
• ReplaceUnhealthy – Terminates instances that are marked as unhealthy
and then creates new instances to replace them
• ScheduledActions – Performs scheduled scaling actions
© Digital Cloud Training | https://digitalcloud.training
Additional Scaling Settings
• Cooldowns – Used with simple scaling policy to prevent Auto
Scaling from launching or terminating before effects of previous
activities are visible. Default value is 300 seconds (5 minutes)
• Termination Policy – Controls which instances to terminate first
when a scale-in event occurs.
• Termination Protection – Prevents Auto Scaling from terminating
protected instances
• Standby State – Used to put an instance in the InService state into
the Standby state, update or troubleshoot the instance
© Digital Cloud Training | https://digitalcloud.training
Additional Scaling Settings
• Lifecycle Hooks – Used to perform custom actions by pausing
instances as the ASG launches or terminates them.
© Digital Cloud Training | https://digitalcloud.training
Advanced Auto Scaling
© Digital Cloud Training | https://digitalcloud.training
Types of Elastic Load Balancer
(ELB)
© Digital Cloud Training | https://digitalcloud.training
Refresher: ELB Basics
Availability Zone
Public subnet
Elastic Load
Balancer
Availability Zone
Public subnet
User 3
User 2
User 1
ELB takes instance 1
out of service (failed
health check)
Instance 1
Instance 2
Instance 3
Instance 4
User 1 is
connected to
instance 4
A listener checks for
connection requests
on a port/protocol
© Digital Cloud Training | https://digitalcloud.training
Types of Elastic Load Balancer (ELB)
Network Load Balancer
Application Load Balancer
Load Balancer Protocol:
TCP, TLS, UDP, TCP_UDP
Instance Protocol:
TCP, TCP_UDP
Load Balancer Protocol:
HTTP, HTTPS
Instance Protocol:
HTTP, HTTPS
Internet Client
Internet Client
• Operates at the connection level
• Routes connections based on IP protocol data (layer 4)
• Offers ultra high performance, low latency and TLS offloading
at scale
• Can have a static IP / Elastic IP
• Supports UDP and static IP addresses as targets
• Operates at the request level
• Routes based on the content of the request (layer 7)
• Supports path-based routing, host-based routing, query string
parameter-based routing, and source IP address-based
routing
• Supports instances, IP addresses, Lambda functions and
containers as targets
Application Load Balancer
Network Load Balancer
© Digital Cloud Training | https://digitalcloud.training
Types of Elastic Load Balancer (ELB)
Classic Load Balancer
Load Balancer Protocol:
TCP, SSL, HTTP, HTTPS • Old generation; not recommended for new applications
• Performs routing at Layer 4 and Layer 7
• Use for existing applications running in EC2-Classic
Instance Protocol:
TCP, SSL, HTTP, HTTPS
Classic Load Balancer
Internet Client
Old and shouldn’t be
the exam anymore
Gateway Load Balancer
Load Balancer Protocol:
All packets on all ports • Used in front of virtual appliances such as firewalls, IDS/IPS,
and deep packet inspection systems.
• Operates at Layer 3 – listens for all packets on all ports
• Forwards traffic to the TG specified in the listener rules
• Exchanges traffic with appliances using the GENEVE
protocol on port 6081
Appliance Protocol:
GENEVE
Gateway Load Balancer
VPC Endpoint
Virtual Appliance
New and not yet
on the exam
© Digital Cloud Training | https://digitalcloud.training
Routing with ALB and NLB
© Digital Cloud Training | https://digitalcloud.training
Application Load Balancer (ALB)
Subnet
Subnet
Subnet
Target groups are used
to route requests to
registered targets
TG1 TG2 TG3
Application Load
Balancer (ALB)
https://example.com/orders
https://example.com/specials
https://members.example.com/
Requests can be
routed based on
the path in the URL
Requests can also be routed based
on the host field in the HTTP header
Targets can be EC2
instances, IP addresses,
Lambda functions or
containers
A rule is
configured on
the listener –
ALBs listen on
HTTP/HTTPS
Path-based
routing
Host-based routing
© Digital Cloud Training | https://digitalcloud.training
Network Load Balancer (NLB)
Subnet
Subnet
Subnet
TG1 TG2
Network Load
Balancer (NLB)
https://example.com:8080
https://example.com
NLB nodes can
have elastic IPs in
each subnet
Requests are routed based
on IP protocol data
Targets can be
outside a VPC
(e.g. on-premises)
A separate listener on a
unique port is required
for routing
NLBs listen on
TCP, TLS, UDP
or TCP_UDP
54.22.182.2
54.239.28.85
54.12.10.212
Targets can be
EC2 instances or
IP addresses
© Digital Cloud Training | https://digitalcloud.training
ALB and NLB Access Control
and SSL/TLS
© Digital Cloud Training | https://digitalcloud.training
Access Control with ALB and NLB
ALB
NLB
Connections
SG
NACL
SG
NACL
NACL
ALB SG
SG
ALB
Connections
SG
NACL
NACL
NACL
SG
Connections
NACL
SG
NACL
NACL
SG
NLB
© Digital Cloud Training | https://digitalcloud.training
What’s the Source IP Address the App sees?
SG
SG
CLB and ALB use
private IP of their ENIs
as source address
IP=A
IP=B
Source Protocol Port
IP=B TCP 80
SG
AWS NLB
AWS ALB AWS NLB
Instance
specified by
Instance ID SG
Instance
specified by IP
Address
Source Protocol Port
IP=A TCP 80
Source Protocol Port
IP=B TCP 80
IP=A
IP=B
IP=A
IP=B
Applicable to TCP
and TLS – for UDP
and TCP_UDP
should be IP=A
When using an NLB with a VPC
Endpoint or AWS GA source IPs are
private IPs of NLB nodes
Note: X-forwarded-for can be used with ALB to capture client IP
© Digital Cloud Training | https://digitalcloud.training
SSL/TLS Termination
AWS ALB
SSL/TLS CERT
Encrypted
Unencrypted
AWS ALB
SSL/TLS CERT
Encrypted
SSL/TLS CERT
Encrypted
ACM certificate or
certificate imported
into ACM or IAM
Self-signed certificate
can be used
With a L7 ELB a
new connection
is established
with the instance
© Digital Cloud Training | https://digitalcloud.training
SSL/TLS Termination
AWS NLB
SSL/TLS CERT
Encrypted
AWS NLB
SSL/TLS CERT
Encrypted
SSL/TLS CERT
Encrypted
Public certificate must
be used
Single encrypted
connection
© Digital Cloud Training | https://digitalcloud.training
Register Domain with
Route 53
© Digital Cloud Training | https://digitalcloud.training
Request Routing with ALB
© Digital Cloud Training | https://digitalcloud.training
Application Load Balancer (ALB)
Subnet
Subnet
TG1 TG2
Application Load
Balancer (ALB)
https://dctlabs.net
https://members.dctlabs.net/
© Digital Cloud Training | https://digitalcloud.training
NLB Static IPs and
Whitelisting
© Digital Cloud Training | https://digitalcloud.training
Network Load Balancer (NLB)
Subnet
Subnet
TG1
Network Load
Balancer (NLB)
54.22.182.2
54.239.28.85
SG
Security Group
Protocol Port Destination
HTTP 80 54.22.182.2
54.239.28.85
© Digital Cloud Training | https://digitalcloud.training
Session State and Session
Stickiness
© Digital Cloud Training | https://digitalcloud.training
Storing Session State
Availability Zone
Public subnet
Elastic Load Balancer
Availability Zone
Public subnet
DynamoDB Table
Session data retrieved
from DynamoDB Table
Session data such as
authentication details
stored in DynamoDB Table
ElastiCache is also a
popular solution for
storing session-state data
User does not need to
re-authenticate
© Digital Cloud Training | https://digitalcloud.training
Sticky Sessions
Availability Zone
Public subnet
Elastic Load Balancer
Availability Zone
Public subnet
Client is directed to
another instance
Session data such as
authentication details
stored locally
Cookie is generated and
client bound to instance
for cookie lifetime
If an instance fails, session state
is lost – use with session state
store for more resiliency
© Digital Cloud Training | https://digitalcloud.training
AWS Batch
© Digital Cloud Training | https://digitalcloud.training
AWS Batch
Launch a Batch Job
Batch launches, manages, and
terminates resources as
required (EC2 and ECS/Fargate)
Job Definition Job Queue
A job is submitted to a
queue until scheduled onto
a compute environment
Batch Compute Environment
Managed or unmanaged
resources used to run the job
A job is a unit of work such
as a shell script, executable
or Docker container image
© Digital Cloud Training | https://digitalcloud.training
Architecture Patterns -
Compute
© Digital Cloud Training | https://digitalcloud.training
Architecture Patterns - Compute
High availability and elastic scalability
for web servers
Use Amazon EC2 Auto Scaling and an
Application Load Balancer across
multiple AZs
Low-latency connections over UDP to a
pool of instances running a gaming
application
Use a Network Load Balancer with a
UDP listener
Clients need to whitelist static IP
addresses for a highly available load
balanced application in an AWS Region.
Use an NLB and create static IP
addresses in each AZ
Requirement Solution
© Digital Cloud Training | https://digitalcloud.training
Architecture Patterns - Compute
Application on EC2 in an Auto Scaling
group requires disaster recovery across
Regions
Create an ASG in a second Region with
the capacity set to 0. Take snapshots
and copy them across Regions (Lambda
or DLM)
Application on EC2 must scale in larger
increments if a big increase in traffic
occurs, compared to small increases in
traffic
Use Auto Scaling with a Step Scaling
policy and configure a larger capacity
increase
Need to scale EC2 instances behind an
ALB based on the number of requests
completed by each instance
Configure a target tracking policy using
the ALBRequestCountPerTarget metric
Requirement Solution
© Digital Cloud Training | https://digitalcloud.training
Architecture Patterns - Compute
Need to run a large batch computing
job at the lowest cost. Must be
managed. Nodes can pick up where
others left off in case of interruption
Use a managed AWS Batch job and use
EC2 Spot instances
A tightly coupled High Performance
Computing (HPC) workload requires
low-latency between nodes and
optimum network performance
Launch EC2 instances in a single AZ in a
cluster placement group and use an
Elastic Fabric Adapter (EFA)
LOB application receives weekly burst
of traffic and must scale for short
periods – need the most cost-effective
solution
Use reserved instances for minimum
required workload and then use Spot
instances for the bursts in traffic
Requirement Solution
© Digital Cloud Training | https://digitalcloud.training
Architecture Patterns - Compute
Application must startup quickly when
launched by ASG but requires app
dependencies and code to be installed
Create an AMI that includes the
application dependencies and code
Application runs on EC2 behind an ALB.
Once authenticated users should not
need to reauthenticate if an instance
fails
Enable Sticky session for the target
group or alternatively use a session
store such as DynamoDB
Requirement Solution
© Digital Cloud Training | https://digitalcloud.training
SECTION 8
AWS Storage Services
© Digital Cloud Training | https://digitalcloud.training
Amazon EBS Deployment and
Volume Types
© Digital Cloud Training | https://digitalcloud.training
Amazon EBS Deployment
EC2 Instance
EBS Volume
Amazon Elastic Block
Store (EBS)
Availability Zone
EC2 Instance
Availability Zone
EC2 Instance
EBS Volume
EBS Volume EBS Volume
Limited support for
attaching multiple
instances*
EBS volumes are
replicated within
an AZ
EC2 instances
must be in the
same AZ as the
EBS volume
© Digital Cloud Training | https://digitalcloud.training
Amazon EBS Multi-Attach
EC2 Instance
Availability Zone
EC2 Instance
EBS Volume
Available for Nitro
system-based
EC2 instances
EC2 Instance
Up to 16 instances
can be attached to a
single volume
Must be a
Provisioned
IOPS io1 volume
Must be within
a single AZ
May not be on the
exam yet
© Digital Cloud Training | https://digitalcloud.training
Amazon EBS SSD-Backed Volumes
New and not on
the exam yet
New and not on
the exam yet
© Digital Cloud Training | https://digitalcloud.training
Amazon EBS HDD-Backed Volumes
© Digital Cloud Training | https://digitalcloud.training
Amazon EBS Copying, Sharing
and Encryption
© Digital Cloud Training | https://digitalcloud.training
Amazon EBS Copying, Sharing and Encryption
EC2 Instance
Volume
Availability Zone A
EC2 Instance
Availability Zone B
Snap A Snap B
Amazon S3
Region
Volume
Snap C
© Digital Cloud Training | https://digitalcloud.training
Take Snapshot, Create AMI, Launch New Instance
EC2 Instance
Availability Zone A
Availability Zone B
Snapshot
Amazon S3
Region
Volume
AMI
EC2 Instance
Volume
© Digital Cloud Training | https://digitalcloud.training
Copying and Sharing AMIs and Snapshots
Snapshot
• Encryption state retained
• Same region
Encrypted
Snapshot
• Can be encrypted
• Can change regions
Copy
Unencrypted
Snapshot
Encrypted
Volume
• Can be encrypted
• Can change AZ
AMI
Unencrypted
Snapshot
• Cannot be encrypted
• Can be shared with other accounts
• Can be shared publicly
• Can change encryption key
• Can change regions
Copy
Volume
Snapshot
Snapshot Snapshot
© Digital Cloud Training | https://digitalcloud.training
Copying and Sharing AMIs and Snapshots
• Can change encryption key
• Can change region
Encrypted
Volume
Encrypted
Snapshot
Encrypted AMI
Encrypted
Snapshot
Encrypted AMI
Encrypted
AMI
Copy
Encrypted
AMI
• Can change encryption key
• Can change AZ
EC2 Instance
Unencrypted
AMI
• Can change encryption state
• Can change AZ
EC2 Instance
• Can be shared with other accounts
(custom key only)
• Cannot be shared publicly
• Can be encrypted
• Can change AZ
© Digital Cloud Training | https://digitalcloud.training
EBS vs instance store
© Digital Cloud Training | https://digitalcloud.training
EBS vs instance store
Amazon Elastic Block
Store (EBS)
Availability Zone
EBS Volume
EC2 Host Server
EBS Volume
Instance Store
volumes are
physically attached
to the host
EBS volumes are
attached over the
network
© Digital Cloud Training | https://digitalcloud.training
EBS vs instance store
• Instance store volumes are high performance local disks that are
physically attached to the host computer on which an EC2 instance runs
• Instance stores are ephemeral which means the data is lost when
powered off (non-persistent)
• Instance stores are ideal for temporary storage of information that
changes frequently, such as buffers, caches, or scratch data
• Instance store volume root devices are created from AMI templates
stored on S3
• Instance store volumes cannot be detached/reattached
© Digital Cloud Training | https://digitalcloud.training
Amazon EFS Refresher
© Digital Cloud Training | https://digitalcloud.training
Network Attached Storage
NIC
Network Attached
Storage Server (NAS)
The Operating System (OS)
sees a file system that is
mapped to a local drive letter
The NAS “shares”
file systems over
the network
NAS devices are file-based storage systems
File Management
© Digital Cloud Training | https://digitalcloud.training
Amazon Elastic File System (EFS) Overview
EC2 Instance
EFS File system
/efs-mnt
EC2 Instance
/efs-mnt
Availability Zone Availability Zone
Corporate data center
On-premises
client
Region
VPN or Direct
Connect
VPC
VPC
Availability Zone
Peering
EFS is only available
for Linux instances
On-premises
computers can
be connected
Can connect
instances from
other VPCs
NFS Protocol is
used
Can simultaneously
connect thousands
of instances
© Digital Cloud Training | https://digitalcloud.training
Amazon Elastic File System (EFS) Overview
EFS File system
Region
VPC
VPC
Availability Zone
Peering
Region
Mount using mount
target IP address (no
DNS)
Can also be
separate AWS
accounts
© Digital Cloud Training | https://digitalcloud.training
Create and Mount EFS File
System
© Digital Cloud Training | https://digitalcloud.training
Amazon S3 Refresher
© Digital Cloud Training | https://digitalcloud.training
Amazon Simple Storage Service (S3)
VPC
Private subnet
Public subnet
EC2 Instance
S3 Gateway Endpoint
Amazon S3
Internet
gateway
Internet Client
Private Connection
Public Internet
http://bucket.s3.aws-region.amazonaws.com
Bucket
Object
An objects consists of:
 Key (name of objects)
 Version ID
 Value (actual data)
 Metadata
 Subresources
 Access control information
http://s3.aws-region.amazonaws.com/bucket
EC2 Instance
A bucket is a
container for
objects
EC2 instances
connect using
public addresses
EC2 instances connect using
private addresses
© Digital Cloud Training | https://digitalcloud.training
Block, File, and Object Storage
EC2 Instance
Volume
Amazon Elastic Block
Store (EBS)
EC2 Instance
Amazon Elastic File
System
File system
HDD/SSD
Availability Zone
EC2 Instance
Availability Zone Availability Zone
Corporate data center
On-premises client
Amazon S3
Internet Client
Object
http://s3.aws-region.amazonaws.com/bucket/object
/dev/xvdf
or C:
/efs-mnt /efs-mnt
Uses the NFS
Protocol
Linux only
REST API: GET, PUT,
POST, SELECT, DELETE
© Digital Cloud Training | https://digitalcloud.training
Amazon S3 Storage Classes
© Digital Cloud Training | https://digitalcloud.training
S3 Storage Classes
S3 Standard S3 Intelligent Tiering S3 Standard-IA S3 One Zone-IA S3 Glacier S3 Glacier Deep Archive
Designed for durability 99.999999999% 99.999999999% 99.999999999% 99.999999999% 99.999999999% 99.999999999%
Designed for availability 99.99% 99.9% 99.9% 99.5% 99.99% 99.99%
Availability SLA 99.9% 99% 99% 99% 99.9% 99.9%
Availability Zones 3 3 3 1 3 3
Minimum capacity charge
per object
N/A N/A 128KB 128KB 40KB 40KB
Minimum storage
duration charge
N/A 30 days 30 days 30 days 90 days 180 days
Retrieval fee N/A N/A Per GB retrieved Per GB retrieved Per GB retrieved Per GB retrieved
First byte latency milliseconds milliseconds milliseconds milliseconds select minutes or
hours
select hours
Storage type Object Object Object Object Object Object
Lifecycle transitions Yes Yes Yes Yes Yes Yes
© Digital Cloud Training | https://digitalcloud.training
Amazon S3 Lifecycle Policies
© Digital Cloud Training | https://digitalcloud.training
S3 Lifecycle Management
There are two types of actions:
• Transition actions - Define when objects transition
to another storage class
• Expiration actions - Define when objects expire
(deleted by S3)
© Digital Cloud Training | https://digitalcloud.training
S3 LM: Supported Transitions
You can transition from the following:
• The S3 Standard storage class to any other storage class
• Any storage class to the S3 Glacier or S3 Glacier Deep
Archive storage classes
• The S3 Standard-IA storage class to the S3 Intelligent-
Tiering or S3 One Zone-IA storage classes
• The S3 Intelligent-Tiering storage class to the S3 One Zone-
IA storage class
• The S3 Glacier storage class to the S3 Glacier Deep Archive
storage class
© Digital Cloud Training | https://digitalcloud.training
S3 LM: Unsupported Transitions
You can't transition from the following:
• Any storage class to the S3 Standard storage class
• Any storage class to the Reduced Redundancy
storage class
• The S3 Intelligent-Tiering storage class to the S3
Standard-IA storage class
• The S3 One Zone-IA storage class to the S3
Standard-IA or S3 Intelligent-Tiering storage classes
© Digital Cloud Training | https://digitalcloud.training
S3 Lifecycle Management
• Can create a lifecycle policy through the console or CLI/API
• When configured using the CLI/API an XML or JSON file must be supplied
• API actions to create/update/delete lifecycle policies:
• PutBucketLifecycleConfiguration - Creates a new lifecycle
configuration for the bucket or replaces an existing lifecycle configuration
• GetBucketLifecycleConfiguration - Returns the lifecycle configuration
information set on the bucket
• DeleteBucketLifecycle - Deletes the lifecycle configuration from the
specified bucket
© Digital Cloud Training | https://digitalcloud.training
Example S3 Lifecycle Policy (XML)
© Digital Cloud Training | https://digitalcloud.training
Create Lifecycle Policies
© Digital Cloud Training | https://digitalcloud.training
S3 Versioning and Replication
© Digital Cloud Training | https://digitalcloud.training
S3 Versioning
• Versioning is a means of keeping multiple variants
of an object in the same bucket
• Use versioning to preserve, retrieve, and restore
every version of every object stored in your
Amazon S3 bucket
• Versioning-enabled buckets enable you to recover
objects from accidental deletion or overwrite
© Digital Cloud Training | https://digitalcloud.training
S3 Replication
Region
Region
Region
Bucket Bucket
Bucket Bucket
Cross-Region Replication (CRR)
Same-Region
Replication (SRR)
Account Account
Buckets must have
versioning enabled
© Digital Cloud Training | https://digitalcloud.training
S3 Encryption
© Digital Cloud Training | https://digitalcloud.training
S3 Encryption
Server-side encryption with S3
managed keys (SSE-S3)
Server-side encryption with AWS
KMS managed keys (SSE-KMS)
Encryption /
decryption
Encryption /
decryption
• S3 managed keys
• Unique object keys
• Master key
• AES 256
• KMS managed keys
• Customer master keys
• CMK can be customer
generated
© Digital Cloud Training | https://digitalcloud.training
S3 Encryption
Server-side encryption with
client provided keys (SSE-C)
Client-side encryption
Encryption /
decryption
Encryption /
decryption
• Client managed keys
• Not stored on AWS
• Client managed keys
• Not stored on AWS
• OR you can use a KMS CMK
© Digital Cloud Training | https://digitalcloud.training
S3 Default Encryption
• Amazon S3 default encryption provides a way to set the default
encryption behavior for an S3 bucket
• You can set default encryption on a bucket so that all new
objects are encrypted when they are stored in the bucket
• The objects are encrypted using server-side encryption
• Amazon S3 encrypts objects before saving them to disk and
decrypts them when the objects are downloaded
• There is no change to the encryption of objects that existed in
the bucket before default encryption was enabled
© Digital Cloud Training | https://digitalcloud.training
Prevent uploads of unencrypted objects
Enforces encryption
using SSE-S3
For SSE-KMS use
"aws:kms"
Example PUT request
© Digital Cloud Training | https://digitalcloud.training
Test S3 Encryption
© Digital Cloud Training | https://digitalcloud.training
S3 Presigned URLs
© Digital Cloud Training | https://digitalcloud.training
S3 Presigned URLs
aws s3 presign s3://dct-data-bucket/cool_image.jpeg
https://dct-data-bucket.s3.ap-southeast-
2.amazonaws.com/cool_image.jpeg?X-Amz-Algorithm=AWS4-HMAC-
SHA256&X-Amz-Credential=AKIA3KSVPHP6MAHNW5YH%2F20200909%2Fap-
southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20200909T053538Z&X-
Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-
Signature=8b74653beee371da07a73dfdb4ff6883742383afa528aecd5c95
c326c97764db
AWS S3 CLI command to
generate a presigned URL
This is the response; the
URL expires after 1 hour
© Digital Cloud Training | https://digitalcloud.training
Server Access Logging
© Digital Cloud Training | https://digitalcloud.training
Server Access Logging
• Provides detailed records for the requests that are made to a
bucket
• Details include the requester, bucket name, request time,
request action, response status, and error code (if applicable)
• Disabled by default
• Only pay for the storage space used
• Must configure a separate bucket as the destination (can specify
a prefix)
• Must grant write permissions to the Amazon S3 Log Delivery
group on destination bucket
© Digital Cloud Training | https://digitalcloud.training
S3 Event Notifications
© Digital Cloud Training | https://digitalcloud.training
S3 Event Notifications
• Sends notifications when events happen in buckets
• Destinations include:
• Amazon Simple Notification Service (SNS) topics
• Amazon Simple Queue Service (SQS) queues
• AWS Lambda
© Digital Cloud Training | https://digitalcloud.training
AWS Storage Gateway
© Digital Cloud Training | https://digitalcloud.training
AWS Storage Gateway
© Digital Cloud Training | https://digitalcloud.training
AWS Storage Gateway – File Gateway
AWS Storage Gateway
S3 Standard
S3 Standard IA
S3 One Zone IA
AWS Cloud
Corporate
data center
Server
The file system is
mounted using
NFS or SMB
A virtual gateway
appliance runs on
Hyper-V, VMware,
or EC2
A local cache provides
low latency access to
recently used data
Files are stored
as objects in S3
Can store data
in multiple S3
storage classes
© Digital Cloud Training | https://digitalcloud.training
AWS Storage Gateway – File Gateway
• File gateway provides a virtual on-premises file
server
• Store and retrieve files as objects in Amazon S3
• Use with on-premises applications, and EC2-based
applications that need file storage in S3 for object-
based workloads
• File gateway offers SMB or NFS-based access to data
in Amazon S3 with local caching
© Digital Cloud Training | https://digitalcloud.training
AWS Storage Gateway - Volume Gateway
AWS Storage Gateway
S3 Standard
AWS Cloud
Corporate
data center
Server
AWS Storage Gateway
S3 Standard
Server
iSCSI
iSCSI
CACHED VOLUME MODE
STORED VOLUME MODE
Asynchronous replication
A cache of the most
recently used data
on-premise
Entire data set is
stored on-premise
Entire data set is
stored in S3
Data backed up as
point-in-time
snapshots
© Digital Cloud Training | https://digitalcloud.training
AWS Storage Gateway - Volume Gateway
• The volume gateway supports block-based volumes
• Block storage – iSCSI protocol
• Cached Volume mode – the entire dataset is stored on S3 and a
cache of the most frequently accessed data is cached on-site
• Stored Volume mode – the entire dataset is stored on-site and is
asynchronously backed up to S3 (EBS point-in-time snapshots).
Snapshots are incremental and compressed
© Digital Cloud Training | https://digitalcloud.training
AWS Storage Gateway - Tape Gateway
AWS Storage Gateway
S3 Glacier
S3 Glacier
Deep Archive
S3 Standard
AWS Cloud
Corporate
data center
Backup Server
iSCSI
Backup server can
use many common
backup applications
Once tapes are
ejected from the
backup app, they
are stored in one
of these classes
S3 standard is
used when
writing to tapes
© Digital Cloud Training | https://digitalcloud.training
AWS Storage Gateway - Tape Gateway
• Used for backup with popular backup software
• Each gateway is preconfigured with a media changer and tape drives. Supported by
NetBackup, Backup Exec, Veeam etc.
• When creating virtual tapes, you select one of the following sizes: 100 GB, 200 GB, 400
GB, 800 GB, 1.5 TB, and 2.5 TB
• A tape gateway can have up to 1,500 virtual tapes with a maximum aggregate capacity of
1 PB
• All data transferred between the gateway and AWS storage is encrypted using SSL
• All data stored by tape gateway in S3 is encrypted server-side with Amazon S3-Managed
Encryption Keys (SSE-S3)
© Digital Cloud Training | https://digitalcloud.training
SECTION 9
DNS, Caching, and Performance
Optimization
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 Hosted
Zones
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 Hosted Zones
Amazon Route 53
example.com
Availability Zone
Public subnet
Region
VPC
Web Server:
8.1.2.1
What’s the address for
example.com?
Address is 8.1.2.1
HTTP GET to 8.1.2.1
A hosted zone represents
a set of records belonging
to a domain
This is an example of a
public hosted zone
Name Type Value TTL
example.com A 8.1.2.1 60
dev.example.com A 8.1.2.2 60
© Digital Cloud Training | https://digitalcloud.training
Private subnet
Amazon Route 53 Hosted Zones
Amazon Route 53
mycompany.local
Public subnet
VPC
DB Server:
10.0.0.10
Association with VPC
Address is 10.0.0.10
Connection to 10.0.0.10
This is an example of a
private hosted zone
Name Type Value TTL
db.mycompany.local A 10.0.0.10 60
app.mycompany.local A 10.0.0.11 60
Enable DNS Hostnames = Enabled
DNS Resolution = Enabled
What’s the address for
db.mycompany.local?
© Digital Cloud Training | https://digitalcloud.training
Migration to/from Route 53
• You can migrate from another DNS provider and can import
records
• You can migrate a hosted zone to another AWS account
• You can migrate from Route 53 to another registrar
• You can also associate a Route 53 hosted zone with a VPC in
another account
• Authorize association with VPC in the second account.
• Create an association in the second account
© Digital Cloud Training | https://digitalcloud.training
Route 53 Routing Policies
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 Routing Policies
Routing Policy What it does
Simple Simple DNS response providing the IP address associated with a name
Failover If primary is down (based on health checks), routes to secondary destination
Geolocation Uses geographic location you’re in (e.g. Europe) to route you to the closest
region
Geoproximity Routes you to the closest region within a geographic area
Latency Directs you based on the lowest latency route to resources
Multivalue answer Returns several IP addresses and functions as a basic load balancer
Weighted Uses the relative weights assigned to resources to determine which to route to
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 – Simple Routing Policy
Amazon Route 53
DNS query
Name Type Value TTL
simple.dctlabs.com A 1.1.1.1
2.2.2.2
60
simple2.dctlabs.com A 3.3.3.3 60
Region
1
2
3
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 – Weighted Routing Policy
Amazon Route 53
DNS query
Name Type Value Health Weight
weighted.dctlabs.com A 1.1.1.1 ID 60
weighted.dctlabs.com A 2.2.2.2 ID 20
weighted.dctlabs.com A 3.3.3.3 ID 20
Region
1
2
3
Region
1.1.1.1
2.2.2.2
3.3.3.3
60%
20%
20%
Optional Health
Checks
Simplified values - actually
uses an integer between 0
and 255
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 – Latency Routing Policy
Amazon Route 53
DNS query
Name Type Value Health Region
latency.dctlabs.com A 1.1.1.1 ID ap-southeast-1
latency.dctlabs.com A 2.2.2.2 ID us-east-1
latency.dctlabs.com A alb-id ID ap-southeast-2
Region – ap-southeast-2
Region – us-east-1
Optional Health
Checks
Region – ap-southeast-1
1.1.1.1
2.2.2.2
Singapore
New York
Sydney
DNS query
DNS query
ALB
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 – Failover Routing Policy
Amazon Route 53
Name Type Value Health Record Type
failover.dctlabs.com A 1.1.1.1 ID Primary
failover.dctlabs.com A alb-id Secondary
Region – ap-southeast-2
Region – us-east-1
1.1.1.1
DNS query
ALB
ap-southeast-2 is the
secondary Region
Health check is
required on Primary
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 – Geolocation Routing Policy
Amazon Route 53
Name Type Value Health Geolocation
geolocation.dctlabs.com A 1.1.1.1 ID Singapore
geolocation.dctlabs.com A 2.2.2.2 ID Default
geolocation.dctlabs.com A alb-id ID Oceania
Region – ap-southeast-2
Region – us-east-1
Optional Health
Checks
2.2.2.2
Mexico
New Zealand
DNS query
DNS query
ALB
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 – Multivalue Routing Policy
Amazon Route 53
DNS query
Region
1
2
3
Name Type Value Health Multi Value
multivalue.dctlabs.com A 1.1.1.1 ID Yes
multivalue.dctlabs.com A 2.2.2.2 ID Yes
multivalue.dctlabs.com A 3.3.3.3 ID Yes
Health Checks:
returns healthy
records only
© Digital Cloud Training | https://digitalcloud.training
Test Route 53 Routing Policies
© Digital Cloud Training | https://digitalcloud.training
Amazon Route 53 Resolver
© Digital Cloud Training | https://digitalcloud.training
Route 53 Resolver – Outbound Endpoints
VPC
Private subnet
Public subnet
Customer
gateway
VPN connection
VPN gateway
Corporate data center
DNS server
Amazon Route 53
Outbound
Endpoint
Outbound
Endpoint
EC2 Instance
EC2 Instance
1
2
3
DNS server responds to
query via Outbound
Endpoint/Route 53
© Digital Cloud Training | https://digitalcloud.training
Route 53 Resolver – Inbound Endpoints
VPC
Private subnet
Public subnet
Customer
gateway
VPN connection
VPN gateway
Corporate data center
DNS server
Amazon Route 53
Inbound
Endpoint
Inbound
Endpoint
EC2 Instance
EC2 Instance
3
2
Client
1
Result is returned by
Route 53 via the Inbound
Endpoint
© Digital Cloud Training | https://digitalcloud.training
Amazon CloudFront Origins
and Distributions
© Digital Cloud Training | https://digitalcloud.training
Amazon CloudFront
Users
Edge location
Region
Amazon EC2
Amazon S3
CloudFront Origins
Edge location
Edge location
Edge location
Edge location
Edge location
Edge location
Users
Users
Users
Users
Users
Users
Content is pushed
from the origin and
cached
Edge locations
are distributed
around the world
Users are directed
to the nearest
edge location
© Digital Cloud Training | https://digitalcloud.training
CloudFront Origins and Distributions
CloudFront Distribution
Beach.jpg
Behaviors
S3 Origin
Custom Origin
Path Pattern
Viewer Protocol Policy
Cache Policy
Origin Request Policy
RTMP distributions were discontinued
so only web distributions are currently
available
CloudFront Web Distribution:
• Speed up distribution of static and dynamic content, for
example, .html, .css, .php, and graphics files.
• Distribute media files using HTTP or HTTPS.
• Add, update, or delete objects, and submit data from web
forms.
• Use live streaming to stream an event in real time.
Name: d1schtd9zdwrm1.cloudfront.net
doc.html
Manual.pdf
S3 static websites
can also be origins
© Digital Cloud Training | https://digitalcloud.training
Amazon CloudFront Caching
and Behaviors
© Digital Cloud Training | https://digitalcloud.training
Amazon CloudFront Caching
Edge location Global
Users
Regional
Edge Cache
Edge location
Global
Users
Regional
Edge Cache
Edge location
Global
Users
Region
Amazon EC2
Amazon S3
CloudFront Origins
There are 12 Regional
Edge Caches
There are 210
Edge locations
© Digital Cloud Training | https://digitalcloud.training
Amazon CloudFront Caching
Edge location
(POP)
Regional
Edge Cache
Region
CloudFront Origin
AWS Global
Network
HTTP GET
Image
Cache MISS
Cache MISS
Object is cached for
TTL (default 24hrs)
Cache HIT
When the TTL expires
the file is removed
Decreasing the TTL is best for
Dynamic content, increasing TTL
is better for performance (and
reduces load on origin)
© Digital Cloud Training | https://digitalcloud.training
Amazon CloudFront Caching
• You can define a maximum Time To Live (TTL) and a
default TTL
• TTL is defined at the behavior level
• This can be used to define different TTLs for different
file types (e.g. png vs jpg)
• After expiration, CloudFront checks the origin for any
new requests (check the file is the latest version)
• Headers can be used to control the cache:
• Cache-Control max-age=(seconds) - specify how long
before CloudFront gets the object again from the origin
server
• Expires – specify an expiration date and time
© Digital Cloud Training | https://digitalcloud.training
CloudFront Path Patterns
CloudFront Distribution
HTTP GET beach.jpg
Beach.jpg
The path pattern determines
where to send the request
Clip.mp4
Behaviors
Origin 1
Origin 2
*.jpg = Origin 1
*.mp4 = Origin 2
Default = Origin 1
HTTP GET clip.mp4
The default origin is used
for any requests that don’t
match a path pattern
Origin 1
Origin 1
Origin 2
© Digital Cloud Training | https://digitalcloud.training
Caching Based on Request Headers
• You can configure CloudFront to forward headers
in the viewer request to the origin
• CloudFront can then cache multiple versions of an
object based on the values in one or more request
headers
• Controlled in a behavior to do one of the
following:
• Forward all headers to your origin (objects are not
cached)
• Forward a whitelist of headers that you specify
• Forward only the default headers (doesn’t cache
objects based on values in request headers)
© Digital Cloud Training | https://digitalcloud.training
CloudFront Signed URLs and
OAI
© Digital Cloud Training | https://digitalcloud.training
CloudFront Signed URLs
• Signed URLs provide more
control over access to content.
• Can specify beginning and
expiration date and time, IP
addresses/ranges of users.
Serverless
Application
Amazon CloudFront
1
2
3
4
Mobile app authenticates to
application and requests
signed URL
Signed URL returned
Mobile app uses signed
URL to access distribution
Signed URLs should be used for
individual files and clients that
don’t support cookies.
© Digital Cloud Training | https://digitalcloud.training
CloudFront Signed Cookies
• Similar to Signed URLs
• Use signed cookies when you don’t want to change
URLs
• Can also be used when you want to provide access to
multiple restricted files (Signed URLs are for individual
files)
© Digital Cloud Training | https://digitalcloud.training
CloudFront Origin Access Identity (OAI)
Amazon CloudFront
S3 Bucket configured
as static website
Custom Origin
Bucket Policy
Origin Access Identity (OAI)
Users
HTTP GET https://d1schtd9zdwrm1.cloudfront.net
GET https://mybucket.s3.amazonaws.com/beach.jpg
Policy restricts access
to the OAI
Blocked by bucket policy
© Digital Cloud Training | https://digitalcloud.training
Cache and Behavior Settings
© Digital Cloud Training | https://digitalcloud.training
CloudFront SSL/TLS and SNI
© Digital Cloud Training | https://digitalcloud.training
CloudFront SSL/TLS
S3 Origin
Custom Origin
AWS Certificate
Manager
For CloudFront
certificate must be
issued in us-east-1
Certificate can be ACM or a
trusted third-party CA
Viewer Protocol
Origin Protocol
S3 has its own certificate
(can’t be changed)
Certificate can be ACM
(ALB) or third-party (EC2)
Default CF domain
name can be
changed using
CNAMES
Origin certificates
must be public
certificates
© Digital Cloud Training | https://digitalcloud.training
CloudFront Server Name Indication (SNI)
S3 Origin
Custom Origin
Request URL includes
domain name which
matches certificate
Name: myotherdomain.com
HTTP GET: https://mypublicdomain.com
Multiple certificates
share the same IP
with SNI
HTTP GET: https://myotherdomain.com
Name: mypublicdomain.com
Note: SNI works with
browsers/clients released
after 2010 – otherwise
need dedicated IP
© Digital Cloud Training | https://digitalcloud.training
Lambda@Edge
© Digital Cloud Training | https://digitalcloud.training
Lambda@Edge
• Run Node.js and Python Lambda functions to customize the content
CloudFront delivers
• Executes functions closer to the viewer
• Can be run at the following points
• After CloudFront receives a request from a viewer (viewer request)
• Before CloudFront forwards the request to the origin (origin request)
• After CloudFront receives the response from the origin (origin response)
• Before CloudFront forwards the response to the viewer (viewer response)
CloudFront Cache S3 Origin
Viewer response Origin response
Viewer request Origin request
© Digital Cloud Training | https://digitalcloud.training
AWS Global Accelerator
© Digital Cloud Training | https://digitalcloud.training
AWS Global Accelerator
Amazon Route 53
Users in US
Resolve dctlabs.com
Answer:
51.45.2.12
53.58.31.89
Edge location
Addresses:
51.45.2.12
53.58.31.89
us-east-1 ap-southeast-2
AWS Global Network
Global Accelerator
Users are
redirected to
another endpoint
Static anycast
IP addresses
Requests are
routed to the
optimal endpoint
User traffic ingresses
using the closest Edge
Location
Traffic
traverses the
AWS global
network
Connect via Edge Location
© Digital Cloud Training | https://digitalcloud.training
Create a Global Accelerator
© Digital Cloud Training | https://digitalcloud.training
AWS Global Accelerator
Amazon Route 53
Users in US
Resolve dctlabs.com
Answer:
51.45.2.12
53.58.31.89
Edge location
Addresses:
51.45.2.12
53.58.31.89
us-east-1 ap-southeast-2
AWS Global Network
Global Accelerator
Connect via Edge Location

More Related Content

What's hot

What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...
What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...
What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...Edureka!
 
AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019Amazon Web Services
 
Aws certified-solutions-architect-associate-training
Aws certified-solutions-architect-associate-trainingAws certified-solutions-architect-associate-training
Aws certified-solutions-architect-associate-trainingCloudsara
 
Creating your Hybrid Cloud with AWS -Technical 201
Creating your Hybrid Cloud with AWS -Technical 201Creating your Hybrid Cloud with AWS -Technical 201
Creating your Hybrid Cloud with AWS -Technical 201Amazon Web Services
 
AWS Transit Gateway-Benefits and Best Practices
AWS Transit Gateway-Benefits and Best PracticesAWS Transit Gateway-Benefits and Best Practices
AWS Transit Gateway-Benefits and Best PracticesJohn Varghese
 
AWS Certified Cloud Practitioner Course S1-S6
AWS Certified Cloud Practitioner Course S1-S6AWS Certified Cloud Practitioner Course S1-S6
AWS Certified Cloud Practitioner Course S1-S6Neal Davis
 
Securing Your AWS Infrastructure with Edge Services - May 2017 AWS Online Tec...
Securing Your AWS Infrastructure with Edge Services - May 2017 AWS Online Tec...Securing Your AWS Infrastructure with Edge Services - May 2017 AWS Online Tec...
Securing Your AWS Infrastructure with Edge Services - May 2017 AWS Online Tec...Amazon Web Services
 
VMware Cloud on AWS - Technical Deep Dive - AWS Summit Sydney
VMware Cloud on AWS - Technical Deep Dive - AWS Summit SydneyVMware Cloud on AWS - Technical Deep Dive - AWS Summit Sydney
VMware Cloud on AWS - Technical Deep Dive - AWS Summit SydneyAmazon Web Services
 
(NET208) Enable & Secure Your Business Apps via the Hybrid Cloud on AWS
(NET208) Enable & Secure Your Business Apps via the Hybrid Cloud on AWS(NET208) Enable & Secure Your Business Apps via the Hybrid Cloud on AWS
(NET208) Enable & Secure Your Business Apps via the Hybrid Cloud on AWSAmazon Web Services
 
AWS PrivateLink: Fundamentals - SRV211 - Anaheim AWS Summit
AWS PrivateLink: Fundamentals - SRV211 - Anaheim AWS SummitAWS PrivateLink: Fundamentals - SRV211 - Anaheim AWS Summit
AWS PrivateLink: Fundamentals - SRV211 - Anaheim AWS SummitAmazon Web Services
 
Aws Architecture Fundamentals
Aws Architecture FundamentalsAws Architecture Fundamentals
Aws Architecture Fundamentals2nd Watch
 
Deploy Golang WebApp dengan AWS App Runner
Deploy Golang WebApp dengan AWS App RunnerDeploy Golang WebApp dengan AWS App Runner
Deploy Golang WebApp dengan AWS App RunnerRio Astamal
 
Security & Governance on AWS – Better, Faster, and Cost Effective - Technical...
Security & Governance on AWS – Better, Faster, and Cost Effective - Technical...Security & Governance on AWS – Better, Faster, and Cost Effective - Technical...
Security & Governance on AWS – Better, Faster, and Cost Effective - Technical...Amazon Web Services
 
VMware Cloud on AWS -- A Technical Deep Dive PPT
VMware Cloud on AWS -- A Technical Deep Dive PPTVMware Cloud on AWS -- A Technical Deep Dive PPT
VMware Cloud on AWS -- A Technical Deep Dive PPTAmazon Web Services
 
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...Amazon Web Services
 
Hybrid Cloud Architectures on VMware Cloud on AWS.pdf
Hybrid Cloud Architectures on VMware Cloud on AWS.pdfHybrid Cloud Architectures on VMware Cloud on AWS.pdf
Hybrid Cloud Architectures on VMware Cloud on AWS.pdfAmazon Web Services
 
Best practices to Support Active Directory Aware Workloads on AWS
Best practices to Support Active Directory Aware Workloads on AWSBest practices to Support Active Directory Aware Workloads on AWS
Best practices to Support Active Directory Aware Workloads on AWSAmazon Web Services
 
Breaking Down the Economics and TCO of Migrating to AWS
Breaking Down the Economics and TCO of Migrating to AWSBreaking Down the Economics and TCO of Migrating to AWS
Breaking Down the Economics and TCO of Migrating to AWSAmazon Web Services
 

What's hot (20)

What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...
What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...
What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...
 
AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019AWS Core Services Overview, Immersion Day Huntsville 2019
AWS Core Services Overview, Immersion Day Huntsville 2019
 
Aws certified-solutions-architect-associate-training
Aws certified-solutions-architect-associate-trainingAws certified-solutions-architect-associate-training
Aws certified-solutions-architect-associate-training
 
Creating your Hybrid Cloud with AWS -Technical 201
Creating your Hybrid Cloud with AWS -Technical 201Creating your Hybrid Cloud with AWS -Technical 201
Creating your Hybrid Cloud with AWS -Technical 201
 
AWS Transit Gateway-Benefits and Best Practices
AWS Transit Gateway-Benefits and Best PracticesAWS Transit Gateway-Benefits and Best Practices
AWS Transit Gateway-Benefits and Best Practices
 
AWS Certified Cloud Practitioner Course S1-S6
AWS Certified Cloud Practitioner Course S1-S6AWS Certified Cloud Practitioner Course S1-S6
AWS Certified Cloud Practitioner Course S1-S6
 
Securing Your AWS Infrastructure with Edge Services - May 2017 AWS Online Tec...
Securing Your AWS Infrastructure with Edge Services - May 2017 AWS Online Tec...Securing Your AWS Infrastructure with Edge Services - May 2017 AWS Online Tec...
Securing Your AWS Infrastructure with Edge Services - May 2017 AWS Online Tec...
 
VMware Cloud on AWS - Technical Deep Dive - AWS Summit Sydney
VMware Cloud on AWS - Technical Deep Dive - AWS Summit SydneyVMware Cloud on AWS - Technical Deep Dive - AWS Summit Sydney
VMware Cloud on AWS - Technical Deep Dive - AWS Summit Sydney
 
(NET208) Enable & Secure Your Business Apps via the Hybrid Cloud on AWS
(NET208) Enable & Secure Your Business Apps via the Hybrid Cloud on AWS(NET208) Enable & Secure Your Business Apps via the Hybrid Cloud on AWS
(NET208) Enable & Secure Your Business Apps via the Hybrid Cloud on AWS
 
CloudCircle AWS Training
CloudCircle AWS Training CloudCircle AWS Training
CloudCircle AWS Training
 
AWS PrivateLink: Fundamentals - SRV211 - Anaheim AWS Summit
AWS PrivateLink: Fundamentals - SRV211 - Anaheim AWS SummitAWS PrivateLink: Fundamentals - SRV211 - Anaheim AWS Summit
AWS PrivateLink: Fundamentals - SRV211 - Anaheim AWS Summit
 
AWS Business Essentials
AWS Business EssentialsAWS Business Essentials
AWS Business Essentials
 
Aws Architecture Fundamentals
Aws Architecture FundamentalsAws Architecture Fundamentals
Aws Architecture Fundamentals
 
Deploy Golang WebApp dengan AWS App Runner
Deploy Golang WebApp dengan AWS App RunnerDeploy Golang WebApp dengan AWS App Runner
Deploy Golang WebApp dengan AWS App Runner
 
Security & Governance on AWS – Better, Faster, and Cost Effective - Technical...
Security & Governance on AWS – Better, Faster, and Cost Effective - Technical...Security & Governance on AWS – Better, Faster, and Cost Effective - Technical...
Security & Governance on AWS – Better, Faster, and Cost Effective - Technical...
 
VMware Cloud on AWS -- A Technical Deep Dive PPT
VMware Cloud on AWS -- A Technical Deep Dive PPTVMware Cloud on AWS -- A Technical Deep Dive PPT
VMware Cloud on AWS -- A Technical Deep Dive PPT
 
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
 
Hybrid Cloud Architectures on VMware Cloud on AWS.pdf
Hybrid Cloud Architectures on VMware Cloud on AWS.pdfHybrid Cloud Architectures on VMware Cloud on AWS.pdf
Hybrid Cloud Architectures on VMware Cloud on AWS.pdf
 
Best practices to Support Active Directory Aware Workloads on AWS
Best practices to Support Active Directory Aware Workloads on AWSBest practices to Support Active Directory Aware Workloads on AWS
Best practices to Support Active Directory Aware Workloads on AWS
 
Breaking Down the Economics and TCO of Migrating to AWS
Breaking Down the Economics and TCO of Migrating to AWSBreaking Down the Economics and TCO of Migrating to AWS
Breaking Down the Economics and TCO of Migrating to AWS
 

Similar to AWS Certified Solutions Architect Professional Course S6-S9

AWS re:Invent 2016: Hybrid Architecture Design: Connecting Your On-Premises W...
AWS re:Invent 2016: Hybrid Architecture Design: Connecting Your On-Premises W...AWS re:Invent 2016: Hybrid Architecture Design: Connecting Your On-Premises W...
AWS re:Invent 2016: Hybrid Architecture Design: Connecting Your On-Premises W...Amazon Web Services
 
Cisco Cloud Connect Solutions Extend Your Private Network to AWS and Maintain...
Cisco Cloud Connect Solutions Extend Your Private Network to AWS and Maintain...Cisco Cloud Connect Solutions Extend Your Private Network to AWS and Maintain...
Cisco Cloud Connect Solutions Extend Your Private Network to AWS and Maintain...Amazon Web Services
 
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...Amazon Web Services
 
打破時空藩籬,輕鬆存取您的雲端工作負載
打破時空藩籬,輕鬆存取您的雲端工作負載打破時空藩籬,輕鬆存取您的雲端工作負載
打破時空藩籬,輕鬆存取您的雲端工作負載Amazon Web Services
 
打破時空藩籬-輕鬆存取您的雲端工作負載
打破時空藩籬-輕鬆存取您的雲端工作負載打破時空藩籬-輕鬆存取您的雲端工作負載
打破時空藩籬-輕鬆存取您的雲端工作負載Amazon Web Services
 
Hybrid Infrastructure Integration
Hybrid Infrastructure IntegrationHybrid Infrastructure Integration
Hybrid Infrastructure IntegrationAmazon Web Services
 
Hybrid Infrastructure Integration
Hybrid Infrastructure IntegrationHybrid Infrastructure Integration
Hybrid Infrastructure IntegrationAmazon Web Services
 
Hybrid Infrastructure Integration
Hybrid Infrastructure IntegrationHybrid Infrastructure Integration
Hybrid Infrastructure IntegrationAmazon Web Services
 
Introduction to VMware Cloud on AWS
Introduction to VMware Cloud on AWSIntroduction to VMware Cloud on AWS
Introduction to VMware Cloud on AWSAmazon Web Services
 
2017DellEMCForum-ConsistentCloudOperations-VMwareCloudonAWS-FV.pdf
2017DellEMCForum-ConsistentCloudOperations-VMwareCloudonAWS-FV.pdf2017DellEMCForum-ConsistentCloudOperations-VMwareCloudonAWS-FV.pdf
2017DellEMCForum-ConsistentCloudOperations-VMwareCloudonAWS-FV.pdfShahedHasib1
 
利用AWS建立企業全球化網路
利用AWS建立企業全球化網路利用AWS建立企業全球化網路
利用AWS建立企業全球化網路Amazon Web Services
 
Planning advanced AWS networking architectures - SVC304 - Chicago AWS Summit
Planning advanced AWS networking architectures - SVC304 - Chicago AWS SummitPlanning advanced AWS networking architectures - SVC304 - Chicago AWS Summit
Planning advanced AWS networking architectures - SVC304 - Chicago AWS SummitAmazon Web Services
 
Pitt Immersion Day Module 3 - networking in AWS
Pitt Immersion Day Module 3 - networking in AWSPitt Immersion Day Module 3 - networking in AWS
Pitt Immersion Day Module 3 - networking in AWSEagleDream Technologies
 
Running Hybrid Cloud Patterns on AWS
Running Hybrid Cloud Patterns on AWSRunning Hybrid Cloud Patterns on AWS
Running Hybrid Cloud Patterns on AWSShiva Narayanaswamy
 
Deep Dive - Hybrid Architectures
Deep Dive - Hybrid ArchitecturesDeep Dive - Hybrid Architectures
Deep Dive - Hybrid ArchitecturesAmazon Web Services
 
DEM08 Use Cisco Cloud Connect to Securely Extend Private Network to AWS and M...
DEM08 Use Cisco Cloud Connect to Securely Extend Private Network to AWS and M...DEM08 Use Cisco Cloud Connect to Securely Extend Private Network to AWS and M...
DEM08 Use Cisco Cloud Connect to Securely Extend Private Network to AWS and M...Amazon Web Services
 
Connectivity Options for VMware Cloud on AWS Software Defined Data Centers (S...
Connectivity Options for VMware Cloud on AWS Software Defined Data Centers (S...Connectivity Options for VMware Cloud on AWS Software Defined Data Centers (S...
Connectivity Options for VMware Cloud on AWS Software Defined Data Centers (S...Amazon Web Services
 
VMware Cloud on AWS - 100819.pdf
VMware Cloud on AWS - 100819.pdfVMware Cloud on AWS - 100819.pdf
VMware Cloud on AWS - 100819.pdfAmazon Web Services
 
AWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsAWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsShiva Narayanaswamy
 

Similar to AWS Certified Solutions Architect Professional Course S6-S9 (20)

AWS re:Invent 2016: Hybrid Architecture Design: Connecting Your On-Premises W...
AWS re:Invent 2016: Hybrid Architecture Design: Connecting Your On-Premises W...AWS re:Invent 2016: Hybrid Architecture Design: Connecting Your On-Premises W...
AWS re:Invent 2016: Hybrid Architecture Design: Connecting Your On-Premises W...
 
Cisco Cloud Connect Solutions Extend Your Private Network to AWS and Maintain...
Cisco Cloud Connect Solutions Extend Your Private Network to AWS and Maintain...Cisco Cloud Connect Solutions Extend Your Private Network to AWS and Maintain...
Cisco Cloud Connect Solutions Extend Your Private Network to AWS and Maintain...
 
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...
 
打破時空藩籬,輕鬆存取您的雲端工作負載
打破時空藩籬,輕鬆存取您的雲端工作負載打破時空藩籬,輕鬆存取您的雲端工作負載
打破時空藩籬,輕鬆存取您的雲端工作負載
 
打破時空藩籬-輕鬆存取您的雲端工作負載
打破時空藩籬-輕鬆存取您的雲端工作負載打破時空藩籬-輕鬆存取您的雲端工作負載
打破時空藩籬-輕鬆存取您的雲端工作負載
 
Hybrid Infrastructure Integration
Hybrid Infrastructure IntegrationHybrid Infrastructure Integration
Hybrid Infrastructure Integration
 
Hybrid Infrastructure Integration
Hybrid Infrastructure IntegrationHybrid Infrastructure Integration
Hybrid Infrastructure Integration
 
Hybrid Infrastructure Integration
Hybrid Infrastructure IntegrationHybrid Infrastructure Integration
Hybrid Infrastructure Integration
 
Introduction to VMware Cloud on AWS
Introduction to VMware Cloud on AWSIntroduction to VMware Cloud on AWS
Introduction to VMware Cloud on AWS
 
2017DellEMCForum-ConsistentCloudOperations-VMwareCloudonAWS-FV.pdf
2017DellEMCForum-ConsistentCloudOperations-VMwareCloudonAWS-FV.pdf2017DellEMCForum-ConsistentCloudOperations-VMwareCloudonAWS-FV.pdf
2017DellEMCForum-ConsistentCloudOperations-VMwareCloudonAWS-FV.pdf
 
利用AWS建立企業全球化網路
利用AWS建立企業全球化網路利用AWS建立企業全球化網路
利用AWS建立企業全球化網路
 
Planning advanced AWS networking architectures - SVC304 - Chicago AWS Summit
Planning advanced AWS networking architectures - SVC304 - Chicago AWS SummitPlanning advanced AWS networking architectures - SVC304 - Chicago AWS Summit
Planning advanced AWS networking architectures - SVC304 - Chicago AWS Summit
 
Pitt Immersion Day Module 3 - networking in AWS
Pitt Immersion Day Module 3 - networking in AWSPitt Immersion Day Module 3 - networking in AWS
Pitt Immersion Day Module 3 - networking in AWS
 
Running Hybrid Cloud Patterns on AWS
Running Hybrid Cloud Patterns on AWSRunning Hybrid Cloud Patterns on AWS
Running Hybrid Cloud Patterns on AWS
 
Deep Dive - Hybrid Architectures
Deep Dive - Hybrid ArchitecturesDeep Dive - Hybrid Architectures
Deep Dive - Hybrid Architectures
 
DEM08 Use Cisco Cloud Connect to Securely Extend Private Network to AWS and M...
DEM08 Use Cisco Cloud Connect to Securely Extend Private Network to AWS and M...DEM08 Use Cisco Cloud Connect to Securely Extend Private Network to AWS and M...
DEM08 Use Cisco Cloud Connect to Securely Extend Private Network to AWS and M...
 
Connectivity Options for VMware Cloud on AWS Software Defined Data Centers (S...
Connectivity Options for VMware Cloud on AWS Software Defined Data Centers (S...Connectivity Options for VMware Cloud on AWS Software Defined Data Centers (S...
Connectivity Options for VMware Cloud on AWS Software Defined Data Centers (S...
 
VMware Cloud on AWS - 100819.pdf
VMware Cloud on AWS - 100819.pdfVMware Cloud on AWS - 100819.pdf
VMware Cloud on AWS - 100819.pdf
 
AWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsAWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro Tips
 
Colt Enterprise vCloud
Colt Enterprise vCloudColt Enterprise vCloud
Colt Enterprise vCloud
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

AWS Certified Solutions Architect Professional Course S6-S9

  • 1. © Digital Cloud Training | https://digitalcloud.training SECTION 6 Hybrid Connectivity
  • 2. © Digital Cloud Training | https://digitalcloud.training AWS Client VPN
  • 3. © Digital Cloud Training | https://digitalcloud.training AWS Client VPN Region VPC – CIDR 10.0.0.0/16 Private subnet – 10.0.5.0/24 Public subnet – 10.0.1.0/24 EC2 Instance CIDR 10.1.0.0/22 – performs SNAT to 10.0.0.0/16 VPN Endpoint VPN VPN client connects over SSL/TLS (443) Client VPN network interfaces created in subnet Destination Gateway 10.0.0.0/16 10.1.1.X Local route of associated subnet is added to client route table Assoc. Assoc. 10.0.5.12 10.0.1.15
  • 4. © Digital Cloud Training | https://digitalcloud.training Deploy AWS Client VPN
  • 5. © Digital Cloud Training | https://digitalcloud.training AWS Client VPN – Hands-On Region VPC – CIDR 10.0.0.0/16 Private subnet – 10.0.5.0/24 Public subnet – 10.0.1.0/24 EC2 Instance VPN Endpoint VPN Assoc. Assoc. 10.0.5.12 10.0.1.15 Amazon Workspaces Region
  • 6. © Digital Cloud Training | https://digitalcloud.training AWS Site-to-Site VPN
  • 7. © Digital Cloud Training | https://digitalcloud.training AWS Site-to-Site VPN VPC Private subnet Public subnet Customer gateway VPN connection Virtual Private Gateway (VGW) Corporate data center Destination Target 192.168.0.0/16 vgw-id Route Table CIDR: 10.0.0.0/16 CIDR: 192.168.0.0/16 A customer gateway is deployed on the customer side A VGW is deployed on the AWS site Route table points to the VGW Supports static routes or BGP peering/routing AWS VPN is a managed IPSec VPN
  • 8. © Digital Cloud Training | https://digitalcloud.training Deploy AWS Site-to-Site VPN
  • 9. © Digital Cloud Training | https://digitalcloud.training AWS Site-to-Site VPN – Hands-On VPC Public subnet VPN connection Virtual Private Gateway (VGW) On-Premises DC Destination Target 10.0.0.0/16 openswan-instance-id Route Table CIDR: 10.0.0.0/16 CIDR: 172.31.0.0/16 Use the PRODUCTION account for the on- premises DC Use the MANAGEMENT account for the AWS VPC Virtual Private Gateway Propagate vgw-id Yes Route Table OpenSwan / CGW Internal Server EC2 Instance Ping Instance in AWS VPC from internal server using its private IP
  • 10. © Digital Cloud Training | https://digitalcloud.training AWS VPN CloudHub
  • 11. © Digital Cloud Training | https://digitalcloud.training AWS VPN CloudHub VPC Private subnet Public subnet Virtual Private Gateway (VGW) Customer office Customer office Customer office Customer gateway ASN: 6500 Network traffic Network traffic A VGW is deployed on the AWS site Remote offices connect to the VGW in a hub-and- spoke model Network traffic may go between a VPC and a remote office Network traffic between offices can also be routed over the IPSec VPN Each office must use a unique BGP ASN Customer gateway ASN: 6501 Customer gateway ASN: 6502
  • 12. © Digital Cloud Training | https://digitalcloud.training AWS Direct Connect (DX)
  • 13. © Digital Cloud Training | https://digitalcloud.training AWS Direct Connect (DX) Corporate data center AWS Direct Connect location AWS Cloud AWS cage Customer / partner cage AWS Direct Connect endpoint Customer / partner router Region A DX port (1000-Base-LX or 10GBASE-LR) must be allocated in a DX location A cross-connect between the AWS DX router and the customer/partner DX router Customer Router The customer router is connected to the DX router in the DX location VPC Private subnet Public subnet DX is a physical fibre connection to AWS running at 1Gbps or 10Gbps
  • 14. © Digital Cloud Training | https://digitalcloud.training AWS Direct Connect Benefits • Private connectivity between AWS and your data center / office • Consistent network experience – increased speed/latency & bandwidth/throughput • Lower costs for organizations that transfer large volumes of data
  • 15. © Digital Cloud Training | https://digitalcloud.training AWS Direct Connect (DX) VPC Corporate data center AWS Direct Connect location AWS Cloud AWS cage Customer / partner cage Region Amazon S3 Amazon DynamoDB Amazon CloudFront Private subnet Public subnet A VIF is a virtual interface (802.1Q VLAN) and a BGP session A Private VIF connects to a single VPC in the same AWS Region using a VGW A Public VIF can be used to connect to AWS Public services in any Region (but not the Internet) AWS Direct Connect endpoint Customer / partner router VGW Private VIF Public VIF Customer Router
  • 16. © Digital Cloud Training | https://digitalcloud.training AWS Direct Connect (DX) VPC Corporate data center AWS Direct Connect location AWS Cloud AWS cage Customer / partner cage Region AWS Direct Connect endpoint Customer / partner router VGW VPC VPC VGW VGW VIFs can also be shared with other AWS accounts – known as hosted VIFs Multiple Private VIFs can be used to connect to multiple VPCs in the Region Customer Router
  • 17. © Digital Cloud Training | https://digitalcloud.training AWS Direct Connect (DX) • Speeds from 50Mbps to 500Mbps can also be accessed via an APN partner (uses hosted VIFs or hosted connections): • A hosted VIF is a single VIF that is shared with other customers (shared bandwidth) • A hosted connection is a DX connection with a single VIF dedicated to you • DX Connections are NOT encrypted! • Use an IPSec S2S VPN connection over a VIF to add encryption in transit • Link aggregation groups (LAGs) can be used to combine multiple physical connections into a single logical connection using LACP – provides improved speed
  • 18. © Digital Cloud Training | https://digitalcloud.training DX - Native High Availability Corporate data center AWS Direct Connect location Region DX Locations are connected by redundant connections Corporate data center AWS Direct Connect location Multiple DX Locations exist in metropolitan areas where AWS has Regions Cables may share the same pathways = Single Point of Failure
  • 19. © Digital Cloud Training | https://digitalcloud.training Direct Connect + IPSec S2S VPN Corporate data center AWS Direct Connect location Region Internet DX VGW The DX connection is the primary active path An IPSec S2S VPN is the backup path This architecture is NOT recommended for speeds above 1Gbps Multiple SPOFs exist in this architecture, add redundancy to eliminate
  • 20. © Digital Cloud Training | https://digitalcloud.training Create Direct Connect Connection
  • 21. © Digital Cloud Training | https://digitalcloud.training AWS Direct Connect Gateway
  • 22. © Digital Cloud Training | https://digitalcloud.training Direct Connect - Multiple Regions Region – us-west-1 DX Location - Europe Corporate office DX Location - US Region eu-central-1 AWS Cloud Private VIF Private VIF A Private VIF connects to a single VPC in the same AWS Region using a VGW VGW VGW DX is a regional service so multiple DX locations must be used Requires regional offices or long distance (expensive) links Example architecture without AWS Direct Connect Gateway
  • 23. © Digital Cloud Training | https://digitalcloud.training Direct Connect - Multiple Regions Region – us-west-1 Corporate office DX Location - US Region eu-central-1 AWS Cloud Private VIF The DX Gateway is associated with a VGW VGW VGW A Private VIF is associated with the DX Gateway BGP advertises a route to all VPCs via the DX Gateway DX Gateway Example architecture with AWS Direct Connect Gateway
  • 24. © Digital Cloud Training | https://digitalcloud.training Direct Connect - Multiple Regions Region – us-west-1 Corporate office DX Location - US Region eu-central-1 AWS Cloud Private VIF VGW VGW DX Gateway does not allow VGWs to send traffic to each other Network traffic can be routed from on- premises to any VPC DX Gateway Example architecture with AWS Direct Connect Gateway Network traffic
  • 25. © Digital Cloud Training | https://digitalcloud.training AWS Transit Gateway
  • 26. © Digital Cloud Training | https://digitalcloud.training AWS Transit Gateway VPC A VPC B VPC C VPC D Example full mesh architecture without AWS Transit Gateway 6 VPC Peering connections IPSec VPN IPSec VPN IPSec VPN IPSec VPN CGW VGW VGW VGW VGW 4 S2S VPN connections Corporate office To make this architecture redundant add another CGW and double the number of S2S VPN connections!
  • 27. © Digital Cloud Training | https://digitalcloud.training AWS Transit Gateway VPC A VPC B VPC C VPC D Example full mesh architecture with AWS Transit Gateway CGW Transit Gateway is a network transit hub that interconnects VPCs and on-premises networks Corporate office Subnet Subnet Subnet Subnet Subnet Subnet Subnet Subnet Specify one subnet from each AZ to enable routing within the AZ VPCs are attached to Transit Gateway TGWs can be attached to VPNs, Direct Connect Gateways, 3rd party appliances and TGWs in other Regions/accounts
  • 28. © Digital Cloud Training | https://digitalcloud.training AWS TGW + DX Gateway VPC A VPC B VPC C VPC D This architecture supports full transitive routing between on-premises, TGW and VPCs Corporate office Subnet Subnet Subnet Subnet Subnet Subnet Subnet Subnet AWS cage Customer / partner cage AWS Direct Connect endpoint Customer / partner router Transit VIF Customer Router DX Gateway DX Gateway is associated with the TGW A Transit VIF is used when attaching via a DX Gateway to a TGW
  • 29. © Digital Cloud Training | https://digitalcloud.training SECTION 7 Compute, Auto Scaling, and Load Balancing
  • 30. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Pricing Options
  • 31. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Pricing Options Reserved Spot Instances Dedicated Instances Dedicated Hosts On-Demand Savings Plans Standard rate - no discount; no commitments; dev/test, short-term, or unpredictable workloads 1 or 3-year commitment; up to 75% discount; steady-state, predictable workloads and reserved capacity Bid for unused capacity; up to 90% discount; can be terminated at any time; workloads with flexible start and end times Physical isolation at the host hardware level from instances belonging to other customers; pay per instance Commitment to a consistent amount of usage (EC2 + Fargate + Lambda); Pay by $/hour; 1 or 3-year commitment Physical server dedicated for your use; Socket/core visibility, host affinity; pay per host; workloads with server-bound software licenses
  • 32. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Billing Billed per hour; Minimum of 1 hour Billed per second; Minimum of 1 minute Volumes billed per second; Minimum of 1 minute Per-second billing is for Amazon Linux and Ubuntu in On-Demand, Reserved, and Spot forms Commercial Linux distros such as Red Hat EL and SUSE ES use hourly pricing
  • 33. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Reserved Instances (RIs) Standard RI Convertible RI Change AZ, instance size (Linux), networking type Change AZ, instance size (Linux), networking type + Change family, OS, tenancy, payment option Use ModifyReservedInstances API Use ExchangeReservedInstances API Term is 1 or 3 years Can pay All Upfront, Partial Upfront, No Upfront
  • 34. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Reserved Instances (RIs) When the attributes of a used instance match the attributes of an RI the discount is applied Tenancy: Default or Dedicated Availability Zone Region Reserves capacity in specified AZ Does not reserve capacity; discount applies to all AZs
  • 35. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Reserved Instances (RIs) Scheduled RI • Match capacity reservation to recurring schedule • Minimum 1200 hours per year • Example: Reporting app that runs 6 hours a day 4 days a week = 1248 hours per year This message started showing recently but exam may not reflect this yet
  • 36. © Digital Cloud Training | https://digitalcloud.training AWS Savings Plans Compute Savings Plan EC2 Savings Plan 1 or 3-year; hourly commitment to usage of Fargate, Lambda, and EC2; Any Region, family, size, tenancy, and OS 1 or 3-year; hourly commitment to usage of EC2 within a selected Region and Instance Family; Any size, tenancy and OS
  • 37. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Spot Instances Spot Fleet: launches and maintains the number of Spot / On-Demand instances to meet specified target capacity Bid for unused capacity at up to 90% discount Spot Instance: One or more EC2 instances EC2 Fleet: launches and maintains specified number of Spot / On-Demand / Reserved instances in a single API call Can define separate OD/Spot capacity targets, bids, instance types, and AZs 2-minute warning if AWS need to reclaim capacity – available via instance metadata and CloudWatch Events
  • 38. © Digital Cloud Training | https://digitalcloud.training Spot Block Requirement: Uninterrupted for 1-6 hours Solution: Spot Block Pricing is 30% - 45% less than On-Demand
  • 39. © Digital Cloud Training | https://digitalcloud.training Dedicated Instances and Dedicated Hosts Characteristic Dedicated Instances Dedicated Hosts Enables the use of dedicated physical servers X X Per instance billing (subject to a $2 per region fee) X Per host billing X Visibility of sockets, cores, host ID X Affinity between a host and instance X Targeted instance placement X Automatic instance placement X X Add capacity using an allocation request X
  • 40. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Pricing Use Cases
  • 41. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Pricing Use Cases Developer working on a small project for several hours; cannot be interrupted Reserved Scheduled Reserved Spot Instances Dedicated Instances Dedicated Hosts On-Demand Compute-intensive, cost- sensitive distributed computing; can withstand interruption Steady-state, business critical, line-of-business application; continuous demand
  • 42. © Digital Cloud Training | https://digitalcloud.training Amazon EC2 Pricing Use Cases Reporting application, runs for 6 hours a day, 4 days per week Reserved Scheduled Reserved Spot Instances Dedicated Instances Dedicated Hosts On-Demand Database with per-socket licensing Security-sensitive application, requires dedicated hardware; per-instance billing
  • 43. © Digital Cloud Training | https://digitalcloud.training Bootstrapping AMIs
  • 44. © Digital Cloud Training | https://digitalcloud.training AMIs and Bootstrapping How can we launch our EC2 instances and install dependencies, applications, software and security updates, and configure customizations quickly?
  • 45. © Digital Cloud Training | https://digitalcloud.training Customized AMIs Linux Microsoft Windows EC2 Instance EBS Snapshot Family Type vCPUs Memory (GiB) General purpose t2.micro 1 1 Compute optimized c5n.large 2 5.25 Memory optimized r5ad.large 2 16 Storage optimized d2.xlarge 4 30.5 GPU instances g2.2xlarge 8 15 Select an instance type Amazon Machine Image (AMI) • OS Customizations • Application Dependencies • Application and Configuration • Software and Security updates Customized AMI
  • 46. © Digital Cloud Training | https://digitalcloud.training User Data EC2 Instance Amazon Machine Image (AMI) • OS Customizations • Application Dependencies • Application and Configuration • Software and Security updates User Data (script) A combined approach would use a customized AMI + User Data
  • 47. © Digital Cloud Training | https://digitalcloud.training Automation and Configuration Management Tools Use automation and configuration tools • AWS CloudFormation • AWS OpsWorks • AWS Systems Manager • AWS CodePipeline, CodeDeploy etc. • Chef and Puppet • Jenkins
  • 48. © Digital Cloud Training | https://digitalcloud.training EC2 Placement Group Use Cases
  • 49. © Digital Cloud Training | https://digitalcloud.training EC2 Placement Groups  Cluster – packs instances close together inside an Availability Zone. This strategy enables workloads to achieve the low-latency network performance necessary for tightly-coupled node-to-node communication that is typical of HPC applications  Partition – spreads your instances across logical partitions such that groups of instances in one partition do not share the underlying hardware with groups of instances in different partitions. This strategy is typically used by large distributed and replicated workloads, such as Hadoop, Cassandra, and Kafka  Spread – strictly places a small group of instances across distinct underlying hardware to reduce correlated failures
  • 50. © Digital Cloud Training | https://digitalcloud.training Cluster Placement Group Region VPC Availability Zone EC2 Instances Cluster Placement Group Uses enhanced networking, low network latency and high throughput for inter-instance traffic
  • 51. © Digital Cloud Training | https://digitalcloud.training Partition Placement Group Region VPC Availability Zone EC2 Instances Partition 1 EC2 Instances Partition 2 Availability Zone EC2 Instances Partition 3 Each partition is located on a separate AWS rack Partitions can be in multiple AZs (up to 7 per AZ)
  • 52. © Digital Cloud Training | https://digitalcloud.training Spread Placement Group Region VPC Availability Zone Availability Zone Each instance is located on a separate AWS rack
  • 53. © Digital Cloud Training | https://digitalcloud.training EC2 Placement Group Use Cases Tightly-coupled application that requires low-latency, high throughput network traffic between instances Partition Spread Cluster Distributed and replicated NoSQL database; requires separate hardware for node groups Small number of critical instances that should be kept separate from each other
  • 54. © Digital Cloud Training | https://digitalcloud.training Network Interfaces (ENI, ENA, EFA)
  • 55. © Digital Cloud Training | https://digitalcloud.training Public subnet Network Interfaces (ENI, ENA, EFA) eth0 Private subnet eth1 Availability Zone EC2 Instance Availability Zone Public subnet Private subnet 172.31.15.89 52.63.195.113 The primary network interface has a private IP and optionally a public IP Additional ENIs can be attached from subnets within the same AZ You cannot attach ENIs from subnets in different AZs
  • 56. © Digital Cloud Training | https://digitalcloud.training Network Interfaces (ENI, ENA, EFA) Elastic network interface Elastic network adapter Elastic Fabric Adapter • Basic adapter type for when you don’t have any high-performance requirements • Can use with all instance types • Enhanced networking performance • Higher bandwidth and lower inter-instance latency • Must choose supported instance type • Use with High Performance Computing and MPI and ML use cases • Tightly coupled applications • Can use with all instance types
  • 57. © Digital Cloud Training | https://digitalcloud.training Working with ENIs
  • 58. © Digital Cloud Training | https://digitalcloud.training Public, Private and Elastic IP Addresses
  • 59. © Digital Cloud Training | https://digitalcloud.training Public subnet Public, Private and Elastic IP Addresses Public subnet eth0 eth1 Availability Zone EC2 Instance 172.31.15.89 52.63.195.113 A public IP address is a dynamic address AWS Account 172.31.55.108 Elastic IP 54.66.202.9 An Elastic IP address is a static address
  • 60. © Digital Cloud Training | https://digitalcloud.training Public subnet Public, Private and Elastic IP Addresses Public subnet eth0 eth1 Availability Zone EC2 Instance 172.31.15.89 52.63.195.113 AWS Account 172.31.55.108 54.66.202.9 EC2 Instance Both ENIs and EIPs can be remapped to a different instance eth0
  • 61. © Digital Cloud Training | https://digitalcloud.training Public subnet Public, Private and Elastic IP Addresses Public subnet eth0 eth1 Availability Zone EC2 Instance AWS Account 172.31.55.108 54.66.202.9 EC2 Instance Public subnet Public subnet eth0 Availability Zone eth1 EIPs can be remapped across AZs
  • 62. © Digital Cloud Training | https://digitalcloud.training Public, Private and Elastic IP addresses Name Description Public IP address Lost when the instance is stopped Used in Public Subnets No charge Associated with a private IP address on the instance Cannot be moved between instances Private IP address Retained when the instance is stopped Used in Public and Private Subnets Elastic IP address Static Public IP address You are charged if not used Associated with a private IP address on the instance Can be moved between instances and Elastic Network Adapters
  • 63. © Digital Cloud Training | https://digitalcloud.training NAT for Public Addresses
  • 64. © Digital Cloud Training | https://digitalcloud.training NAT for Public Addresses Public / Elastic Internet gateway Association IGW performs 1:1 NAT eth0 172.31.32.63 3.104.75.244 Src: 54.23.86.101 Dest: 172.31.32.63 The Internet Gateway performs NAT Src: 54.23.86.101 Dest: 3.104.75.244 Src: 172.31.32.63 Dest: 54.23.86.101 Src: 3.104.75.244 Dest: 54.23.86.101
  • 65. © Digital Cloud Training | https://digitalcloud.training Working with EC2 IP addresses
  • 66. © Digital Cloud Training | https://digitalcloud.training Advanced Auto Scaling
  • 67. © Digital Cloud Training | https://digitalcloud.training Refresher: Auto Scaling Basics Availability Zone Public subnet Availability Zone Public subnet Auto Scaling group Metrics Metrics EC2 Instances EC2 Instances Metric reports CPU > 80% Amazon CloudWatch CloudWatch notifies Auto Scaling to scale Auto Scaling launches extra instance EC2 Status Checks fail ASG replaces failed instance
  • 68. © Digital Cloud Training | https://digitalcloud.training Dynamic Scaling – Target Tracking Availability Zone Public subnet Availability Zone Public subnet Auto Scaling group Metrics Metrics Amazon CloudWatch ASGAverageCPUUtilization = 60% 67 52 56 65 Average CPU = 60%
  • 69. © Digital Cloud Training | https://digitalcloud.training Dynamic Scaling – Target Tracking Availability Zone Public subnet Availability Zone Public subnet Auto Scaling group Metrics Metrics Amazon CloudWatch ASGAverageCPUUtilization = 60% 67 74 65 Average CPU = 71.5% 80 Instance metrics are not counted until warm-up time has expired AWS recommend scaling on metrics with a 1-minute frequency
  • 70. © Digital Cloud Training | https://digitalcloud.training Dynamic Scaling – Target Tracking Metrics: • ASGAverageCPUUtilization—Average CPU utilization of the Auto Scaling group • ASGAverageNetworkIn—Average number of bytes received on all network interfaces by the Auto Scaling group • ASGAverageNetworkOut—Average number of bytes sent out on all network interfaces by the Auto Scaling group • ALBRequestCountPerTarget—Number of requests completed per target in an Application Load Balancer target group
  • 71. © Digital Cloud Training | https://digitalcloud.training Dynamic Scaling – Target Tracking with SQS Auto Scaling group App: AWS CLI/SDK Reads capacity Reads SQS metric ApproximateNumberOfMessages = 1000 Launch instances to process backlog in SQS queue SQS Queue Emits custom metric
  • 72. © Digital Cloud Training | https://digitalcloud.training Dynamic Scaling – Simple Scaling Auto Scaling group CPU = 70% Launch 2 instances Alarm set to CPU >= 60% Wait 300 seconds before allowing another scaling activity
  • 73. © Digital Cloud Training | https://digitalcloud.training Dynamic Scaling – Step Scaling Auto Scaling group CPU = 70% Launch 2 instances Alarm set to CPU >= 60% Auto Scaling group CPU = 80% Launch 4 instances Alarm set to CPU >= 60%
  • 74. © Digital Cloud Training | https://digitalcloud.training Scheduled Scaling Auto Scaling group Launch X instances Schedule set to scale daily at 08:45 Attempts to maintain desired count -> The minimum instances running at any time -> The maximum instances that can run ->
  • 75. © Digital Cloud Training | https://digitalcloud.training Scaling Processes • Launch – Adds a new EC2 instance to an Auto Scaling group • Terminate – Removes an EC2 instance from the group • AddToLoadBalancer – Adds instances to an attached ELB or TG • AlarmNotification – Accepts notifications from CloudWatch alarms that are associated with the group's scaling policies • AZRebalance – Balances the number of EC2 instances in the group evenly across all of the specified Availability Zones • HealthCheck – Checks the health of the instances and marks an instance as unhealthy if Amazon EC2 or Elastic Load Balancing tells Amazon EC2 Auto Scaling that the instance is unhealthy • ReplaceUnhealthy – Terminates instances that are marked as unhealthy and then creates new instances to replace them • ScheduledActions – Performs scheduled scaling actions
  • 76. © Digital Cloud Training | https://digitalcloud.training Additional Scaling Settings • Cooldowns – Used with simple scaling policy to prevent Auto Scaling from launching or terminating before effects of previous activities are visible. Default value is 300 seconds (5 minutes) • Termination Policy – Controls which instances to terminate first when a scale-in event occurs. • Termination Protection – Prevents Auto Scaling from terminating protected instances • Standby State – Used to put an instance in the InService state into the Standby state, update or troubleshoot the instance
  • 77. © Digital Cloud Training | https://digitalcloud.training Additional Scaling Settings • Lifecycle Hooks – Used to perform custom actions by pausing instances as the ASG launches or terminates them.
  • 78. © Digital Cloud Training | https://digitalcloud.training Advanced Auto Scaling
  • 79. © Digital Cloud Training | https://digitalcloud.training Types of Elastic Load Balancer (ELB)
  • 80. © Digital Cloud Training | https://digitalcloud.training Refresher: ELB Basics Availability Zone Public subnet Elastic Load Balancer Availability Zone Public subnet User 3 User 2 User 1 ELB takes instance 1 out of service (failed health check) Instance 1 Instance 2 Instance 3 Instance 4 User 1 is connected to instance 4 A listener checks for connection requests on a port/protocol
  • 81. © Digital Cloud Training | https://digitalcloud.training Types of Elastic Load Balancer (ELB) Network Load Balancer Application Load Balancer Load Balancer Protocol: TCP, TLS, UDP, TCP_UDP Instance Protocol: TCP, TCP_UDP Load Balancer Protocol: HTTP, HTTPS Instance Protocol: HTTP, HTTPS Internet Client Internet Client • Operates at the connection level • Routes connections based on IP protocol data (layer 4) • Offers ultra high performance, low latency and TLS offloading at scale • Can have a static IP / Elastic IP • Supports UDP and static IP addresses as targets • Operates at the request level • Routes based on the content of the request (layer 7) • Supports path-based routing, host-based routing, query string parameter-based routing, and source IP address-based routing • Supports instances, IP addresses, Lambda functions and containers as targets Application Load Balancer Network Load Balancer
  • 82. © Digital Cloud Training | https://digitalcloud.training Types of Elastic Load Balancer (ELB) Classic Load Balancer Load Balancer Protocol: TCP, SSL, HTTP, HTTPS • Old generation; not recommended for new applications • Performs routing at Layer 4 and Layer 7 • Use for existing applications running in EC2-Classic Instance Protocol: TCP, SSL, HTTP, HTTPS Classic Load Balancer Internet Client Old and shouldn’t be the exam anymore Gateway Load Balancer Load Balancer Protocol: All packets on all ports • Used in front of virtual appliances such as firewalls, IDS/IPS, and deep packet inspection systems. • Operates at Layer 3 – listens for all packets on all ports • Forwards traffic to the TG specified in the listener rules • Exchanges traffic with appliances using the GENEVE protocol on port 6081 Appliance Protocol: GENEVE Gateway Load Balancer VPC Endpoint Virtual Appliance New and not yet on the exam
  • 83. © Digital Cloud Training | https://digitalcloud.training Routing with ALB and NLB
  • 84. © Digital Cloud Training | https://digitalcloud.training Application Load Balancer (ALB) Subnet Subnet Subnet Target groups are used to route requests to registered targets TG1 TG2 TG3 Application Load Balancer (ALB) https://example.com/orders https://example.com/specials https://members.example.com/ Requests can be routed based on the path in the URL Requests can also be routed based on the host field in the HTTP header Targets can be EC2 instances, IP addresses, Lambda functions or containers A rule is configured on the listener – ALBs listen on HTTP/HTTPS Path-based routing Host-based routing
  • 85. © Digital Cloud Training | https://digitalcloud.training Network Load Balancer (NLB) Subnet Subnet Subnet TG1 TG2 Network Load Balancer (NLB) https://example.com:8080 https://example.com NLB nodes can have elastic IPs in each subnet Requests are routed based on IP protocol data Targets can be outside a VPC (e.g. on-premises) A separate listener on a unique port is required for routing NLBs listen on TCP, TLS, UDP or TCP_UDP 54.22.182.2 54.239.28.85 54.12.10.212 Targets can be EC2 instances or IP addresses
  • 86. © Digital Cloud Training | https://digitalcloud.training ALB and NLB Access Control and SSL/TLS
  • 87. © Digital Cloud Training | https://digitalcloud.training Access Control with ALB and NLB ALB NLB Connections SG NACL SG NACL NACL ALB SG SG ALB Connections SG NACL NACL NACL SG Connections NACL SG NACL NACL SG NLB
  • 88. © Digital Cloud Training | https://digitalcloud.training What’s the Source IP Address the App sees? SG SG CLB and ALB use private IP of their ENIs as source address IP=A IP=B Source Protocol Port IP=B TCP 80 SG AWS NLB AWS ALB AWS NLB Instance specified by Instance ID SG Instance specified by IP Address Source Protocol Port IP=A TCP 80 Source Protocol Port IP=B TCP 80 IP=A IP=B IP=A IP=B Applicable to TCP and TLS – for UDP and TCP_UDP should be IP=A When using an NLB with a VPC Endpoint or AWS GA source IPs are private IPs of NLB nodes Note: X-forwarded-for can be used with ALB to capture client IP
  • 89. © Digital Cloud Training | https://digitalcloud.training SSL/TLS Termination AWS ALB SSL/TLS CERT Encrypted Unencrypted AWS ALB SSL/TLS CERT Encrypted SSL/TLS CERT Encrypted ACM certificate or certificate imported into ACM or IAM Self-signed certificate can be used With a L7 ELB a new connection is established with the instance
  • 90. © Digital Cloud Training | https://digitalcloud.training SSL/TLS Termination AWS NLB SSL/TLS CERT Encrypted AWS NLB SSL/TLS CERT Encrypted SSL/TLS CERT Encrypted Public certificate must be used Single encrypted connection
  • 91. © Digital Cloud Training | https://digitalcloud.training Register Domain with Route 53
  • 92. © Digital Cloud Training | https://digitalcloud.training Request Routing with ALB
  • 93. © Digital Cloud Training | https://digitalcloud.training Application Load Balancer (ALB) Subnet Subnet TG1 TG2 Application Load Balancer (ALB) https://dctlabs.net https://members.dctlabs.net/
  • 94. © Digital Cloud Training | https://digitalcloud.training NLB Static IPs and Whitelisting
  • 95. © Digital Cloud Training | https://digitalcloud.training Network Load Balancer (NLB) Subnet Subnet TG1 Network Load Balancer (NLB) 54.22.182.2 54.239.28.85 SG Security Group Protocol Port Destination HTTP 80 54.22.182.2 54.239.28.85
  • 96. © Digital Cloud Training | https://digitalcloud.training Session State and Session Stickiness
  • 97. © Digital Cloud Training | https://digitalcloud.training Storing Session State Availability Zone Public subnet Elastic Load Balancer Availability Zone Public subnet DynamoDB Table Session data retrieved from DynamoDB Table Session data such as authentication details stored in DynamoDB Table ElastiCache is also a popular solution for storing session-state data User does not need to re-authenticate
  • 98. © Digital Cloud Training | https://digitalcloud.training Sticky Sessions Availability Zone Public subnet Elastic Load Balancer Availability Zone Public subnet Client is directed to another instance Session data such as authentication details stored locally Cookie is generated and client bound to instance for cookie lifetime If an instance fails, session state is lost – use with session state store for more resiliency
  • 99. © Digital Cloud Training | https://digitalcloud.training AWS Batch
  • 100. © Digital Cloud Training | https://digitalcloud.training AWS Batch Launch a Batch Job Batch launches, manages, and terminates resources as required (EC2 and ECS/Fargate) Job Definition Job Queue A job is submitted to a queue until scheduled onto a compute environment Batch Compute Environment Managed or unmanaged resources used to run the job A job is a unit of work such as a shell script, executable or Docker container image
  • 101. © Digital Cloud Training | https://digitalcloud.training Architecture Patterns - Compute
  • 102. © Digital Cloud Training | https://digitalcloud.training Architecture Patterns - Compute High availability and elastic scalability for web servers Use Amazon EC2 Auto Scaling and an Application Load Balancer across multiple AZs Low-latency connections over UDP to a pool of instances running a gaming application Use a Network Load Balancer with a UDP listener Clients need to whitelist static IP addresses for a highly available load balanced application in an AWS Region. Use an NLB and create static IP addresses in each AZ Requirement Solution
  • 103. © Digital Cloud Training | https://digitalcloud.training Architecture Patterns - Compute Application on EC2 in an Auto Scaling group requires disaster recovery across Regions Create an ASG in a second Region with the capacity set to 0. Take snapshots and copy them across Regions (Lambda or DLM) Application on EC2 must scale in larger increments if a big increase in traffic occurs, compared to small increases in traffic Use Auto Scaling with a Step Scaling policy and configure a larger capacity increase Need to scale EC2 instances behind an ALB based on the number of requests completed by each instance Configure a target tracking policy using the ALBRequestCountPerTarget metric Requirement Solution
  • 104. © Digital Cloud Training | https://digitalcloud.training Architecture Patterns - Compute Need to run a large batch computing job at the lowest cost. Must be managed. Nodes can pick up where others left off in case of interruption Use a managed AWS Batch job and use EC2 Spot instances A tightly coupled High Performance Computing (HPC) workload requires low-latency between nodes and optimum network performance Launch EC2 instances in a single AZ in a cluster placement group and use an Elastic Fabric Adapter (EFA) LOB application receives weekly burst of traffic and must scale for short periods – need the most cost-effective solution Use reserved instances for minimum required workload and then use Spot instances for the bursts in traffic Requirement Solution
  • 105. © Digital Cloud Training | https://digitalcloud.training Architecture Patterns - Compute Application must startup quickly when launched by ASG but requires app dependencies and code to be installed Create an AMI that includes the application dependencies and code Application runs on EC2 behind an ALB. Once authenticated users should not need to reauthenticate if an instance fails Enable Sticky session for the target group or alternatively use a session store such as DynamoDB Requirement Solution
  • 106. © Digital Cloud Training | https://digitalcloud.training SECTION 8 AWS Storage Services
  • 107. © Digital Cloud Training | https://digitalcloud.training Amazon EBS Deployment and Volume Types
  • 108. © Digital Cloud Training | https://digitalcloud.training Amazon EBS Deployment EC2 Instance EBS Volume Amazon Elastic Block Store (EBS) Availability Zone EC2 Instance Availability Zone EC2 Instance EBS Volume EBS Volume EBS Volume Limited support for attaching multiple instances* EBS volumes are replicated within an AZ EC2 instances must be in the same AZ as the EBS volume
  • 109. © Digital Cloud Training | https://digitalcloud.training Amazon EBS Multi-Attach EC2 Instance Availability Zone EC2 Instance EBS Volume Available for Nitro system-based EC2 instances EC2 Instance Up to 16 instances can be attached to a single volume Must be a Provisioned IOPS io1 volume Must be within a single AZ May not be on the exam yet
  • 110. © Digital Cloud Training | https://digitalcloud.training Amazon EBS SSD-Backed Volumes New and not on the exam yet New and not on the exam yet
  • 111. © Digital Cloud Training | https://digitalcloud.training Amazon EBS HDD-Backed Volumes
  • 112. © Digital Cloud Training | https://digitalcloud.training Amazon EBS Copying, Sharing and Encryption
  • 113. © Digital Cloud Training | https://digitalcloud.training Amazon EBS Copying, Sharing and Encryption EC2 Instance Volume Availability Zone A EC2 Instance Availability Zone B Snap A Snap B Amazon S3 Region Volume Snap C
  • 114. © Digital Cloud Training | https://digitalcloud.training Take Snapshot, Create AMI, Launch New Instance EC2 Instance Availability Zone A Availability Zone B Snapshot Amazon S3 Region Volume AMI EC2 Instance Volume
  • 115. © Digital Cloud Training | https://digitalcloud.training Copying and Sharing AMIs and Snapshots Snapshot • Encryption state retained • Same region Encrypted Snapshot • Can be encrypted • Can change regions Copy Unencrypted Snapshot Encrypted Volume • Can be encrypted • Can change AZ AMI Unencrypted Snapshot • Cannot be encrypted • Can be shared with other accounts • Can be shared publicly • Can change encryption key • Can change regions Copy Volume Snapshot Snapshot Snapshot
  • 116. © Digital Cloud Training | https://digitalcloud.training Copying and Sharing AMIs and Snapshots • Can change encryption key • Can change region Encrypted Volume Encrypted Snapshot Encrypted AMI Encrypted Snapshot Encrypted AMI Encrypted AMI Copy Encrypted AMI • Can change encryption key • Can change AZ EC2 Instance Unencrypted AMI • Can change encryption state • Can change AZ EC2 Instance • Can be shared with other accounts (custom key only) • Cannot be shared publicly • Can be encrypted • Can change AZ
  • 117. © Digital Cloud Training | https://digitalcloud.training EBS vs instance store
  • 118. © Digital Cloud Training | https://digitalcloud.training EBS vs instance store Amazon Elastic Block Store (EBS) Availability Zone EBS Volume EC2 Host Server EBS Volume Instance Store volumes are physically attached to the host EBS volumes are attached over the network
  • 119. © Digital Cloud Training | https://digitalcloud.training EBS vs instance store • Instance store volumes are high performance local disks that are physically attached to the host computer on which an EC2 instance runs • Instance stores are ephemeral which means the data is lost when powered off (non-persistent) • Instance stores are ideal for temporary storage of information that changes frequently, such as buffers, caches, or scratch data • Instance store volume root devices are created from AMI templates stored on S3 • Instance store volumes cannot be detached/reattached
  • 120. © Digital Cloud Training | https://digitalcloud.training Amazon EFS Refresher
  • 121. © Digital Cloud Training | https://digitalcloud.training Network Attached Storage NIC Network Attached Storage Server (NAS) The Operating System (OS) sees a file system that is mapped to a local drive letter The NAS “shares” file systems over the network NAS devices are file-based storage systems File Management
  • 122. © Digital Cloud Training | https://digitalcloud.training Amazon Elastic File System (EFS) Overview EC2 Instance EFS File system /efs-mnt EC2 Instance /efs-mnt Availability Zone Availability Zone Corporate data center On-premises client Region VPN or Direct Connect VPC VPC Availability Zone Peering EFS is only available for Linux instances On-premises computers can be connected Can connect instances from other VPCs NFS Protocol is used Can simultaneously connect thousands of instances
  • 123. © Digital Cloud Training | https://digitalcloud.training Amazon Elastic File System (EFS) Overview EFS File system Region VPC VPC Availability Zone Peering Region Mount using mount target IP address (no DNS) Can also be separate AWS accounts
  • 124. © Digital Cloud Training | https://digitalcloud.training Create and Mount EFS File System
  • 125. © Digital Cloud Training | https://digitalcloud.training Amazon S3 Refresher
  • 126. © Digital Cloud Training | https://digitalcloud.training Amazon Simple Storage Service (S3) VPC Private subnet Public subnet EC2 Instance S3 Gateway Endpoint Amazon S3 Internet gateway Internet Client Private Connection Public Internet http://bucket.s3.aws-region.amazonaws.com Bucket Object An objects consists of:  Key (name of objects)  Version ID  Value (actual data)  Metadata  Subresources  Access control information http://s3.aws-region.amazonaws.com/bucket EC2 Instance A bucket is a container for objects EC2 instances connect using public addresses EC2 instances connect using private addresses
  • 127. © Digital Cloud Training | https://digitalcloud.training Block, File, and Object Storage EC2 Instance Volume Amazon Elastic Block Store (EBS) EC2 Instance Amazon Elastic File System File system HDD/SSD Availability Zone EC2 Instance Availability Zone Availability Zone Corporate data center On-premises client Amazon S3 Internet Client Object http://s3.aws-region.amazonaws.com/bucket/object /dev/xvdf or C: /efs-mnt /efs-mnt Uses the NFS Protocol Linux only REST API: GET, PUT, POST, SELECT, DELETE
  • 128. © Digital Cloud Training | https://digitalcloud.training Amazon S3 Storage Classes
  • 129. © Digital Cloud Training | https://digitalcloud.training S3 Storage Classes S3 Standard S3 Intelligent Tiering S3 Standard-IA S3 One Zone-IA S3 Glacier S3 Glacier Deep Archive Designed for durability 99.999999999% 99.999999999% 99.999999999% 99.999999999% 99.999999999% 99.999999999% Designed for availability 99.99% 99.9% 99.9% 99.5% 99.99% 99.99% Availability SLA 99.9% 99% 99% 99% 99.9% 99.9% Availability Zones 3 3 3 1 3 3 Minimum capacity charge per object N/A N/A 128KB 128KB 40KB 40KB Minimum storage duration charge N/A 30 days 30 days 30 days 90 days 180 days Retrieval fee N/A N/A Per GB retrieved Per GB retrieved Per GB retrieved Per GB retrieved First byte latency milliseconds milliseconds milliseconds milliseconds select minutes or hours select hours Storage type Object Object Object Object Object Object Lifecycle transitions Yes Yes Yes Yes Yes Yes
  • 130. © Digital Cloud Training | https://digitalcloud.training Amazon S3 Lifecycle Policies
  • 131. © Digital Cloud Training | https://digitalcloud.training S3 Lifecycle Management There are two types of actions: • Transition actions - Define when objects transition to another storage class • Expiration actions - Define when objects expire (deleted by S3)
  • 132. © Digital Cloud Training | https://digitalcloud.training S3 LM: Supported Transitions You can transition from the following: • The S3 Standard storage class to any other storage class • Any storage class to the S3 Glacier or S3 Glacier Deep Archive storage classes • The S3 Standard-IA storage class to the S3 Intelligent- Tiering or S3 One Zone-IA storage classes • The S3 Intelligent-Tiering storage class to the S3 One Zone- IA storage class • The S3 Glacier storage class to the S3 Glacier Deep Archive storage class
  • 133. © Digital Cloud Training | https://digitalcloud.training S3 LM: Unsupported Transitions You can't transition from the following: • Any storage class to the S3 Standard storage class • Any storage class to the Reduced Redundancy storage class • The S3 Intelligent-Tiering storage class to the S3 Standard-IA storage class • The S3 One Zone-IA storage class to the S3 Standard-IA or S3 Intelligent-Tiering storage classes
  • 134. © Digital Cloud Training | https://digitalcloud.training S3 Lifecycle Management • Can create a lifecycle policy through the console or CLI/API • When configured using the CLI/API an XML or JSON file must be supplied • API actions to create/update/delete lifecycle policies: • PutBucketLifecycleConfiguration - Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration • GetBucketLifecycleConfiguration - Returns the lifecycle configuration information set on the bucket • DeleteBucketLifecycle - Deletes the lifecycle configuration from the specified bucket
  • 135. © Digital Cloud Training | https://digitalcloud.training Example S3 Lifecycle Policy (XML)
  • 136. © Digital Cloud Training | https://digitalcloud.training Create Lifecycle Policies
  • 137. © Digital Cloud Training | https://digitalcloud.training S3 Versioning and Replication
  • 138. © Digital Cloud Training | https://digitalcloud.training S3 Versioning • Versioning is a means of keeping multiple variants of an object in the same bucket • Use versioning to preserve, retrieve, and restore every version of every object stored in your Amazon S3 bucket • Versioning-enabled buckets enable you to recover objects from accidental deletion or overwrite
  • 139. © Digital Cloud Training | https://digitalcloud.training S3 Replication Region Region Region Bucket Bucket Bucket Bucket Cross-Region Replication (CRR) Same-Region Replication (SRR) Account Account Buckets must have versioning enabled
  • 140. © Digital Cloud Training | https://digitalcloud.training S3 Encryption
  • 141. © Digital Cloud Training | https://digitalcloud.training S3 Encryption Server-side encryption with S3 managed keys (SSE-S3) Server-side encryption with AWS KMS managed keys (SSE-KMS) Encryption / decryption Encryption / decryption • S3 managed keys • Unique object keys • Master key • AES 256 • KMS managed keys • Customer master keys • CMK can be customer generated
  • 142. © Digital Cloud Training | https://digitalcloud.training S3 Encryption Server-side encryption with client provided keys (SSE-C) Client-side encryption Encryption / decryption Encryption / decryption • Client managed keys • Not stored on AWS • Client managed keys • Not stored on AWS • OR you can use a KMS CMK
  • 143. © Digital Cloud Training | https://digitalcloud.training S3 Default Encryption • Amazon S3 default encryption provides a way to set the default encryption behavior for an S3 bucket • You can set default encryption on a bucket so that all new objects are encrypted when they are stored in the bucket • The objects are encrypted using server-side encryption • Amazon S3 encrypts objects before saving them to disk and decrypts them when the objects are downloaded • There is no change to the encryption of objects that existed in the bucket before default encryption was enabled
  • 144. © Digital Cloud Training | https://digitalcloud.training Prevent uploads of unencrypted objects Enforces encryption using SSE-S3 For SSE-KMS use "aws:kms" Example PUT request
  • 145. © Digital Cloud Training | https://digitalcloud.training Test S3 Encryption
  • 146. © Digital Cloud Training | https://digitalcloud.training S3 Presigned URLs
  • 147. © Digital Cloud Training | https://digitalcloud.training S3 Presigned URLs aws s3 presign s3://dct-data-bucket/cool_image.jpeg https://dct-data-bucket.s3.ap-southeast- 2.amazonaws.com/cool_image.jpeg?X-Amz-Algorithm=AWS4-HMAC- SHA256&X-Amz-Credential=AKIA3KSVPHP6MAHNW5YH%2F20200909%2Fap- southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20200909T053538Z&X- Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz- Signature=8b74653beee371da07a73dfdb4ff6883742383afa528aecd5c95 c326c97764db AWS S3 CLI command to generate a presigned URL This is the response; the URL expires after 1 hour
  • 148. © Digital Cloud Training | https://digitalcloud.training Server Access Logging
  • 149. © Digital Cloud Training | https://digitalcloud.training Server Access Logging • Provides detailed records for the requests that are made to a bucket • Details include the requester, bucket name, request time, request action, response status, and error code (if applicable) • Disabled by default • Only pay for the storage space used • Must configure a separate bucket as the destination (can specify a prefix) • Must grant write permissions to the Amazon S3 Log Delivery group on destination bucket
  • 150. © Digital Cloud Training | https://digitalcloud.training S3 Event Notifications
  • 151. © Digital Cloud Training | https://digitalcloud.training S3 Event Notifications • Sends notifications when events happen in buckets • Destinations include: • Amazon Simple Notification Service (SNS) topics • Amazon Simple Queue Service (SQS) queues • AWS Lambda
  • 152. © Digital Cloud Training | https://digitalcloud.training AWS Storage Gateway
  • 153. © Digital Cloud Training | https://digitalcloud.training AWS Storage Gateway
  • 154. © Digital Cloud Training | https://digitalcloud.training AWS Storage Gateway – File Gateway AWS Storage Gateway S3 Standard S3 Standard IA S3 One Zone IA AWS Cloud Corporate data center Server The file system is mounted using NFS or SMB A virtual gateway appliance runs on Hyper-V, VMware, or EC2 A local cache provides low latency access to recently used data Files are stored as objects in S3 Can store data in multiple S3 storage classes
  • 155. © Digital Cloud Training | https://digitalcloud.training AWS Storage Gateway – File Gateway • File gateway provides a virtual on-premises file server • Store and retrieve files as objects in Amazon S3 • Use with on-premises applications, and EC2-based applications that need file storage in S3 for object- based workloads • File gateway offers SMB or NFS-based access to data in Amazon S3 with local caching
  • 156. © Digital Cloud Training | https://digitalcloud.training AWS Storage Gateway - Volume Gateway AWS Storage Gateway S3 Standard AWS Cloud Corporate data center Server AWS Storage Gateway S3 Standard Server iSCSI iSCSI CACHED VOLUME MODE STORED VOLUME MODE Asynchronous replication A cache of the most recently used data on-premise Entire data set is stored on-premise Entire data set is stored in S3 Data backed up as point-in-time snapshots
  • 157. © Digital Cloud Training | https://digitalcloud.training AWS Storage Gateway - Volume Gateway • The volume gateway supports block-based volumes • Block storage – iSCSI protocol • Cached Volume mode – the entire dataset is stored on S3 and a cache of the most frequently accessed data is cached on-site • Stored Volume mode – the entire dataset is stored on-site and is asynchronously backed up to S3 (EBS point-in-time snapshots). Snapshots are incremental and compressed
  • 158. © Digital Cloud Training | https://digitalcloud.training AWS Storage Gateway - Tape Gateway AWS Storage Gateway S3 Glacier S3 Glacier Deep Archive S3 Standard AWS Cloud Corporate data center Backup Server iSCSI Backup server can use many common backup applications Once tapes are ejected from the backup app, they are stored in one of these classes S3 standard is used when writing to tapes
  • 159. © Digital Cloud Training | https://digitalcloud.training AWS Storage Gateway - Tape Gateway • Used for backup with popular backup software • Each gateway is preconfigured with a media changer and tape drives. Supported by NetBackup, Backup Exec, Veeam etc. • When creating virtual tapes, you select one of the following sizes: 100 GB, 200 GB, 400 GB, 800 GB, 1.5 TB, and 2.5 TB • A tape gateway can have up to 1,500 virtual tapes with a maximum aggregate capacity of 1 PB • All data transferred between the gateway and AWS storage is encrypted using SSL • All data stored by tape gateway in S3 is encrypted server-side with Amazon S3-Managed Encryption Keys (SSE-S3)
  • 160. © Digital Cloud Training | https://digitalcloud.training SECTION 9 DNS, Caching, and Performance Optimization
  • 161. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 Hosted Zones
  • 162. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 Hosted Zones Amazon Route 53 example.com Availability Zone Public subnet Region VPC Web Server: 8.1.2.1 What’s the address for example.com? Address is 8.1.2.1 HTTP GET to 8.1.2.1 A hosted zone represents a set of records belonging to a domain This is an example of a public hosted zone Name Type Value TTL example.com A 8.1.2.1 60 dev.example.com A 8.1.2.2 60
  • 163. © Digital Cloud Training | https://digitalcloud.training Private subnet Amazon Route 53 Hosted Zones Amazon Route 53 mycompany.local Public subnet VPC DB Server: 10.0.0.10 Association with VPC Address is 10.0.0.10 Connection to 10.0.0.10 This is an example of a private hosted zone Name Type Value TTL db.mycompany.local A 10.0.0.10 60 app.mycompany.local A 10.0.0.11 60 Enable DNS Hostnames = Enabled DNS Resolution = Enabled What’s the address for db.mycompany.local?
  • 164. © Digital Cloud Training | https://digitalcloud.training Migration to/from Route 53 • You can migrate from another DNS provider and can import records • You can migrate a hosted zone to another AWS account • You can migrate from Route 53 to another registrar • You can also associate a Route 53 hosted zone with a VPC in another account • Authorize association with VPC in the second account. • Create an association in the second account
  • 165. © Digital Cloud Training | https://digitalcloud.training Route 53 Routing Policies
  • 166. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 Routing Policies Routing Policy What it does Simple Simple DNS response providing the IP address associated with a name Failover If primary is down (based on health checks), routes to secondary destination Geolocation Uses geographic location you’re in (e.g. Europe) to route you to the closest region Geoproximity Routes you to the closest region within a geographic area Latency Directs you based on the lowest latency route to resources Multivalue answer Returns several IP addresses and functions as a basic load balancer Weighted Uses the relative weights assigned to resources to determine which to route to
  • 167. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 – Simple Routing Policy Amazon Route 53 DNS query Name Type Value TTL simple.dctlabs.com A 1.1.1.1 2.2.2.2 60 simple2.dctlabs.com A 3.3.3.3 60 Region 1 2 3
  • 168. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 – Weighted Routing Policy Amazon Route 53 DNS query Name Type Value Health Weight weighted.dctlabs.com A 1.1.1.1 ID 60 weighted.dctlabs.com A 2.2.2.2 ID 20 weighted.dctlabs.com A 3.3.3.3 ID 20 Region 1 2 3 Region 1.1.1.1 2.2.2.2 3.3.3.3 60% 20% 20% Optional Health Checks Simplified values - actually uses an integer between 0 and 255
  • 169. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 – Latency Routing Policy Amazon Route 53 DNS query Name Type Value Health Region latency.dctlabs.com A 1.1.1.1 ID ap-southeast-1 latency.dctlabs.com A 2.2.2.2 ID us-east-1 latency.dctlabs.com A alb-id ID ap-southeast-2 Region – ap-southeast-2 Region – us-east-1 Optional Health Checks Region – ap-southeast-1 1.1.1.1 2.2.2.2 Singapore New York Sydney DNS query DNS query ALB
  • 170. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 – Failover Routing Policy Amazon Route 53 Name Type Value Health Record Type failover.dctlabs.com A 1.1.1.1 ID Primary failover.dctlabs.com A alb-id Secondary Region – ap-southeast-2 Region – us-east-1 1.1.1.1 DNS query ALB ap-southeast-2 is the secondary Region Health check is required on Primary
  • 171. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 – Geolocation Routing Policy Amazon Route 53 Name Type Value Health Geolocation geolocation.dctlabs.com A 1.1.1.1 ID Singapore geolocation.dctlabs.com A 2.2.2.2 ID Default geolocation.dctlabs.com A alb-id ID Oceania Region – ap-southeast-2 Region – us-east-1 Optional Health Checks 2.2.2.2 Mexico New Zealand DNS query DNS query ALB
  • 172. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 – Multivalue Routing Policy Amazon Route 53 DNS query Region 1 2 3 Name Type Value Health Multi Value multivalue.dctlabs.com A 1.1.1.1 ID Yes multivalue.dctlabs.com A 2.2.2.2 ID Yes multivalue.dctlabs.com A 3.3.3.3 ID Yes Health Checks: returns healthy records only
  • 173. © Digital Cloud Training | https://digitalcloud.training Test Route 53 Routing Policies
  • 174. © Digital Cloud Training | https://digitalcloud.training Amazon Route 53 Resolver
  • 175. © Digital Cloud Training | https://digitalcloud.training Route 53 Resolver – Outbound Endpoints VPC Private subnet Public subnet Customer gateway VPN connection VPN gateway Corporate data center DNS server Amazon Route 53 Outbound Endpoint Outbound Endpoint EC2 Instance EC2 Instance 1 2 3 DNS server responds to query via Outbound Endpoint/Route 53
  • 176. © Digital Cloud Training | https://digitalcloud.training Route 53 Resolver – Inbound Endpoints VPC Private subnet Public subnet Customer gateway VPN connection VPN gateway Corporate data center DNS server Amazon Route 53 Inbound Endpoint Inbound Endpoint EC2 Instance EC2 Instance 3 2 Client 1 Result is returned by Route 53 via the Inbound Endpoint
  • 177. © Digital Cloud Training | https://digitalcloud.training Amazon CloudFront Origins and Distributions
  • 178. © Digital Cloud Training | https://digitalcloud.training Amazon CloudFront Users Edge location Region Amazon EC2 Amazon S3 CloudFront Origins Edge location Edge location Edge location Edge location Edge location Edge location Users Users Users Users Users Users Content is pushed from the origin and cached Edge locations are distributed around the world Users are directed to the nearest edge location
  • 179. © Digital Cloud Training | https://digitalcloud.training CloudFront Origins and Distributions CloudFront Distribution Beach.jpg Behaviors S3 Origin Custom Origin Path Pattern Viewer Protocol Policy Cache Policy Origin Request Policy RTMP distributions were discontinued so only web distributions are currently available CloudFront Web Distribution: • Speed up distribution of static and dynamic content, for example, .html, .css, .php, and graphics files. • Distribute media files using HTTP or HTTPS. • Add, update, or delete objects, and submit data from web forms. • Use live streaming to stream an event in real time. Name: d1schtd9zdwrm1.cloudfront.net doc.html Manual.pdf S3 static websites can also be origins
  • 180. © Digital Cloud Training | https://digitalcloud.training Amazon CloudFront Caching and Behaviors
  • 181. © Digital Cloud Training | https://digitalcloud.training Amazon CloudFront Caching Edge location Global Users Regional Edge Cache Edge location Global Users Regional Edge Cache Edge location Global Users Region Amazon EC2 Amazon S3 CloudFront Origins There are 12 Regional Edge Caches There are 210 Edge locations
  • 182. © Digital Cloud Training | https://digitalcloud.training Amazon CloudFront Caching Edge location (POP) Regional Edge Cache Region CloudFront Origin AWS Global Network HTTP GET Image Cache MISS Cache MISS Object is cached for TTL (default 24hrs) Cache HIT When the TTL expires the file is removed Decreasing the TTL is best for Dynamic content, increasing TTL is better for performance (and reduces load on origin)
  • 183. © Digital Cloud Training | https://digitalcloud.training Amazon CloudFront Caching • You can define a maximum Time To Live (TTL) and a default TTL • TTL is defined at the behavior level • This can be used to define different TTLs for different file types (e.g. png vs jpg) • After expiration, CloudFront checks the origin for any new requests (check the file is the latest version) • Headers can be used to control the cache: • Cache-Control max-age=(seconds) - specify how long before CloudFront gets the object again from the origin server • Expires – specify an expiration date and time
  • 184. © Digital Cloud Training | https://digitalcloud.training CloudFront Path Patterns CloudFront Distribution HTTP GET beach.jpg Beach.jpg The path pattern determines where to send the request Clip.mp4 Behaviors Origin 1 Origin 2 *.jpg = Origin 1 *.mp4 = Origin 2 Default = Origin 1 HTTP GET clip.mp4 The default origin is used for any requests that don’t match a path pattern Origin 1 Origin 1 Origin 2
  • 185. © Digital Cloud Training | https://digitalcloud.training Caching Based on Request Headers • You can configure CloudFront to forward headers in the viewer request to the origin • CloudFront can then cache multiple versions of an object based on the values in one or more request headers • Controlled in a behavior to do one of the following: • Forward all headers to your origin (objects are not cached) • Forward a whitelist of headers that you specify • Forward only the default headers (doesn’t cache objects based on values in request headers)
  • 186. © Digital Cloud Training | https://digitalcloud.training CloudFront Signed URLs and OAI
  • 187. © Digital Cloud Training | https://digitalcloud.training CloudFront Signed URLs • Signed URLs provide more control over access to content. • Can specify beginning and expiration date and time, IP addresses/ranges of users. Serverless Application Amazon CloudFront 1 2 3 4 Mobile app authenticates to application and requests signed URL Signed URL returned Mobile app uses signed URL to access distribution Signed URLs should be used for individual files and clients that don’t support cookies.
  • 188. © Digital Cloud Training | https://digitalcloud.training CloudFront Signed Cookies • Similar to Signed URLs • Use signed cookies when you don’t want to change URLs • Can also be used when you want to provide access to multiple restricted files (Signed URLs are for individual files)
  • 189. © Digital Cloud Training | https://digitalcloud.training CloudFront Origin Access Identity (OAI) Amazon CloudFront S3 Bucket configured as static website Custom Origin Bucket Policy Origin Access Identity (OAI) Users HTTP GET https://d1schtd9zdwrm1.cloudfront.net GET https://mybucket.s3.amazonaws.com/beach.jpg Policy restricts access to the OAI Blocked by bucket policy
  • 190. © Digital Cloud Training | https://digitalcloud.training Cache and Behavior Settings
  • 191. © Digital Cloud Training | https://digitalcloud.training CloudFront SSL/TLS and SNI
  • 192. © Digital Cloud Training | https://digitalcloud.training CloudFront SSL/TLS S3 Origin Custom Origin AWS Certificate Manager For CloudFront certificate must be issued in us-east-1 Certificate can be ACM or a trusted third-party CA Viewer Protocol Origin Protocol S3 has its own certificate (can’t be changed) Certificate can be ACM (ALB) or third-party (EC2) Default CF domain name can be changed using CNAMES Origin certificates must be public certificates
  • 193. © Digital Cloud Training | https://digitalcloud.training CloudFront Server Name Indication (SNI) S3 Origin Custom Origin Request URL includes domain name which matches certificate Name: myotherdomain.com HTTP GET: https://mypublicdomain.com Multiple certificates share the same IP with SNI HTTP GET: https://myotherdomain.com Name: mypublicdomain.com Note: SNI works with browsers/clients released after 2010 – otherwise need dedicated IP
  • 194. © Digital Cloud Training | https://digitalcloud.training Lambda@Edge
  • 195. © Digital Cloud Training | https://digitalcloud.training Lambda@Edge • Run Node.js and Python Lambda functions to customize the content CloudFront delivers • Executes functions closer to the viewer • Can be run at the following points • After CloudFront receives a request from a viewer (viewer request) • Before CloudFront forwards the request to the origin (origin request) • After CloudFront receives the response from the origin (origin response) • Before CloudFront forwards the response to the viewer (viewer response) CloudFront Cache S3 Origin Viewer response Origin response Viewer request Origin request
  • 196. © Digital Cloud Training | https://digitalcloud.training AWS Global Accelerator
  • 197. © Digital Cloud Training | https://digitalcloud.training AWS Global Accelerator Amazon Route 53 Users in US Resolve dctlabs.com Answer: 51.45.2.12 53.58.31.89 Edge location Addresses: 51.45.2.12 53.58.31.89 us-east-1 ap-southeast-2 AWS Global Network Global Accelerator Users are redirected to another endpoint Static anycast IP addresses Requests are routed to the optimal endpoint User traffic ingresses using the closest Edge Location Traffic traverses the AWS global network Connect via Edge Location
  • 198. © Digital Cloud Training | https://digitalcloud.training Create a Global Accelerator
  • 199. © Digital Cloud Training | https://digitalcloud.training AWS Global Accelerator Amazon Route 53 Users in US Resolve dctlabs.com Answer: 51.45.2.12 53.58.31.89 Edge location Addresses: 51.45.2.12 53.58.31.89 us-east-1 ap-southeast-2 AWS Global Network Global Accelerator Connect via Edge Location