AWS Design Fundamentals
AWS Design Fundamentals
Services:
Architect
Associate
Certification
AWS Design
Fundamentals
The Thought Process
▪Provide implementation guidance based on best practices
▪Identify and define technical requirements
▪Identify services that meet technical requirements
▪Build secure and reliable applications
▪Basic architecture principles
What We will
Cover
▪How to architect solutions using
AWS services
▪Design solutions based on AWS’s
well architected framework
▪Design patterns for scale,
reliability, and high-availability
▪Best practices based on AWS
recommended architectural
principles
The Well Architected
Framework
AWS Design Pillars
Security Reliability
Performance Cost
Efficiency Optimization
Operational
Excellence
AWS Design Principals
1. Scalability at all levels – compute and data
2. Design with security
3. Removing single points of failure
4. Managed services instead of manual processes
5. Implement caching at each layer
6. Optimize for performance and cost
7. Choose the right database solution
8. Loose coupling with stateless designs
9. Move from fixed servers to disposable resources
The Well Architected Tool
AWS Global
Services
▪Areas of the world where Amazon offers AWS cloud services
▪Traffic between regions faces additional charge for ingress and egress traffic
Regions
Local Regions
Contains a single Available to select There is a local Complements the Local regions are
data center AWS customers region in Osaka, Asia Pacific (Tokyo) isolated from all AWS
Japan Region Regions
Availability Zones
▪An availability Zone contain at least one data center
▪Most availability zones contain multiple data centers
▪Each availability zone has inexpensive low latency Availability Zone
region
Edge Locations
▪Edge locations allow access to Amazon resources
▪Your location and proximity to the best entry point to
Amazon services is determined by Route 53 (DNS)
▪What services are hosted at an Edge location ?
Region
Availability Zones in Operation
▪EC2 instances can launch across multiple subnets hosted
in multiple availability zones
▪ELB can target instances across multiple availability zones
▪Auto Scaling can scale instances across multiple
availability zones
▪Route 53 can distribute traffic across EC2 Instances and
ELB in different AZs and regions
▪RDS solutions are replicated across multiple availability
zones
▪DynamoDB is replicated across multiple availability zones
AZ’s in
Operation
Design Project
1. Customer wants to move their fitness tracker
application from their on premise data center in
Chicago to the AWS cloud.
2. Customers are located on the East and West coast
of North America and Canadian customers are
mostly located in Toronto, Canada.
3. What regions would you choose for hosting the SaaS
application.
4. The application is a SaaS app with no compliance
issues.
Region Possibilities
Corporate resources are starting to be deployed at AWS
by your developers. Your company wants to ensure
AWS compliance levels match against their corporate
requirements. Choose the two answers that reflect best
practices for carrying out an initial security audit and
compliance review.
[1] Review applicable third-party AWS compliance
Sample AWS reports and attestations
Error
Source Destination Data
Checking
Data Packet
Bare Metal Server
Embedded
Router
Bare Metal Server Bare Metal Server
Embedded Embedded
Router Router
Embedded Embedded
Router Router
IP Packet
One VPC, Two VPC ….
Multiple Virtual Data Centers
Production Development
Multi-VPC Based on Requirements
▪Application isolation – public, private application
stack
▪Production from non-production – multiple
VPC’s
▪Compliance audit containment – multiple VPC’s,
flow logs
▪Multi–tenant isolation – VPC tenancy
▪Business unit design – VPC sharing
▪Shared corporate services – monitoring,
authentication
Multiple VPC Use
Case
▪Multiple VPC’s provide segmentation by default
▪Subnet segmentation not enough for compliance
▪Different rules, routing, requirements
IGW EBS
NACLs
ELB VPG
Auto
Scale
AWS Config
CloudWatch CloudTrail
Services that
Trusted
Advisor integrate
IAM Inspector
with VPCs
CloudWatch
Sharing VPC Resources
▪How can we share VPCs?
▪ Enable peering between two VPCs within a region
▪ Enable peering between two VPCs in different regions
Sample AWS Which of the entries below are required when creating the Web
server's security group? Choose two answers
Question [1] For Inbound access allow Source: 10.0.0.0/24 on port 80
[2[ For Outbound access allow Destination 0.0.0.0/0 on port 80
[3] For Inbound allow Source on 10.0.0.0/24 on port 443
[4] For Outbound allow Destination 0.0.0.0/0 on port 443
Which of these statements are true when associating a
subnet with a network NCL? Choose all that apply.
[1] All subnets associated with a network ACL will have
the associated rules applied
[2] Subnets can be associated with more than one
network ACL
Sample AWS [3] Subnets can be associated with only one network
Question ACL
[4] Subnets not associated with a custom network ACL
will be associated with the default network ACL
[5] Network ACLs can’t be disassociated from a subnet
after being assigned
Which of these statements are true when associating a
subnet with a network NCL? Choose all that apply.
[1] All subnets associated with a network ACL will have
the associated rules applied
[2] Subnets can be associated with more than one
network ACL
Sample AWS [3] Subnets can be associated with only one network
Question ACL
[4] Subnets not associated with a custom network ACL
will be associated with the default network ACL
[5] Network ACLs can’t be disassociated from a subnet
after being assigned
EC2 Design
EC2 Cheat Sheet
▪Scaling computing capacity hosted in VPC’s
▪Preconfigured templates for instances called AMIs (Amazon Machine
Image)
▪Secure logon using key pairs
▪Instance types define CPU, RAM, Storage and Networking configuration
▪Persistent storage using EBS volumes
▪Ephemeral storage uses “Temporary” volumes
▪Virtual firewalls called security groups secure your instances
▪Configuration after installation with user data scripts
▪Metadata retrieval using 169.254.169.254 from running Instance
EC2 Deployment Options
▪Core count, memory, storage size and type, network speed
▪F1 – Field programmable gate array FPGA - parallel Processing
▪R4 – Memory intensive applications
▪T2 – Baseline CPU performance with performance burst above
baseline
▪I3 – Fast SSD storage, high OPPS
▪C4 – Compute optimized access to full core control (P - C state)
EC2 Pricing
Sample AWS [1] Each instance must be turned off before adding the
additional interface
Question [2] Each instance can remain running as interfaces can
be attached as a hot attach
[3] Subnets should reside in the same availability zone
[4] Subnets should reside in different availability zones
[5] Subnets must be peered together
Failover from an application server hosted on a
dedicated subnet to another application server on
another dedicated subnet is mandated.
In order to test the failover scenario an additional
network interface must be added to each instance.
What two of the following options are correct in respect
to this scenario? Choose two answers.
Sample AWS [1] Each instance must be turned off before adding the
additional interface
Question [2] Each instance can remain running as interfaces can
be attached as a hot attach
[3] Subnets should reside in the same availability zone
[4] Subnets should reside in different availability zones
[5] Subnets must be peered together
Golden Image Options
▪EC2 Instances
1. Customize an EC2 instance and save configuration
as an AMI
Launch (many) instances from AMI
(Web Tier Security Group) Allow: Port: 80 Source: ELB Security Group
( ELB Security Group) Allow: Port: 8060 Source: Web Tier Security Group
(App Tier Security Group) Allow: Port: 8060 Source: ELB Security Group
(Data tier Security Group) Allow: Port: 3030 Source: App Tier Security Group
SG Design: Bastion Host
Public Subnet
Security Group Security Group
Private Key’s
Corporate Network
Security Groups Best Practice
▪Avoid allowing incoming traffic on 0.0.0.0/0
▪Control ELB ingress rules using an ELB security group
▪Restrict outbound rules – all outbound ports are open by
default
▪Manage security groups (Trusted Advisor)
▪Control security group modifications (IAM)
▪Review event tracking (CloudTrail)
▪Manage compliance (AWS Config)
Security Group Design
Load Balancing
Load-Balancing FYI
▪Classic load balancer – operates at Layer 4
▪ IP protocol data or HTTP / HTTPS
▪ Supports SSL offload
ELB
Autoscaling with Single AZ
Autoscaling with Multi AZ
Regional Load Balancing with Route 53
Amazon
Route 53
Design Project
Scenario: Auto Scaling with CPU Utilization CloudWatch Alarms
IAM S3 S3 Glacier
User identity
Backups and storage Data archival
Management
CloudTrail CloudWatch
API audit logging Autoscaling @ Metrics
Amazon
Route 53
Route 53
Public Subnets
Private Subnets
Web layer
Private Subnets
App layer
AWS Email
Config
SNS
API Calls CloudWatch
Logs
SMS
CloudTrail
Scale In Event
Cache
Updates
RDS Database
Database Reads
Instance
Database Writes
ElastiCache
Read
Replicas
Session State Caching
Username – P/W
DynamoDB
EC2
Session Cookie
Username – P/W
Request with
Session Cookie Request with
Session Cookie ElastiCache
EC2 (Redis)
Get Session Info
Edge Caching with CloudFront
▪Copies of static content ( images, videos) and dynamic
content (HTML responses, streaming video)
▪Utilize CloudFront CDN with multiple worldwide edge
locations
▪Content served by cache location closest to end-users
▪Content requests are sent to S3 buckets or origin servers
▪Existing connections between origin servers are reused to
reduce latency, speeding up dynamic content requests
▪CloudFront increases performance for both upload and
download requests at the edge location
Content Delivery
with CloudFront
.php
Application Load
Balancer
S3
S3 bucket with
.jpg objects
Route 53 Amazon
CloudFront
Amazon
Route 53
Application Load
Balancer
Static Content S
stored in S3
App Tier
ElastiCache
A Z -1 A Z -2
External
Connectivity
Connectivity
Cheat Sheet
▪VPN connections provide IPSec connections from on premise
data centers to AWS across the Internet
▪The AWS side of the VPN tunnel is the Virtual Private Gateway
(VPG)
▪The VPN tunnel is initiated from the CGW to the VPG / VPC
Virtual Private
Gateway
Customer
Gateway
Redundant Hardware VPN
AWS Customer Network
Customer
Gateway # 1
Virtual Private
Gateway
Customer
Gateway # 2
VPN
Cloud
Hub
Direct Connect + VPN
Customer Network
AWS
Direct Connect
Public Logical
Connection
Virtual Private
Gateway AWS Direct
Connect Customer
WAN
AWS Direct
VPC
Connect Location
Your company needs hybrid connectivity to the Amazon
cloud. What two components are required at the
customer site in order to connect successfully to AWS?
Choose one answer
[1] Virtual private gateway
Sample AWS
[2] Virtual private cloud
Question [3] Customer gateway
[4] VPN connection
[5] Direct Connect
Your company needs hybrid connectivity to the Amazon
cloud. What two components are required at the
customer site in order to connect successfully to AWS?
Choose one answer
[1] Virtual private gateway
Sample AWS
[2] Virtual private cloud
Question [3] Customer gateway
[4] VPN connection
[5] Direct Connect
Storage
Concepts
EBS Storage
Cheat Sheet
▪EBS network attached block storage
▪EBS volumes cannot be shared with multiple EC2
Instances
▪Multiple volumes can be attached to a single EC2
Instance
▪Volumes can be detached and attached to another EC2
Instance only in the same AZ
▪Snapshots cannot span across regions
▪Snapshots can be restored to a new volume in the
region
▪Snapshots can be copied to a different region and
restored as a volume in the new region
EBS Workflow
EC2 Instance # 1 EC2 Instance # 2
EBS root Launch EBS root Create EBS root Launch EBS root
volume Instance volume Image volume Instance volume
Snapshot Snapshot
▪Pre-signed URLs can be used for sharing without requiring AWS security
credentials
▪Security provided by OAI User, signed URL’s for RTMP distribution, or signed
cookies
▪Integrated with CloudTrail, CloudWatch, SNS, and Lambda for event notifications
Message
New Order
Thumbnail
ASG Instances
Low-Res
Notification
ASG Instances
SNS Topic
High-Res
ASG Instances
SQS Queues
Design Project: Voting
Dynamo DB
Tables
Workers Results
Verified Votes
Spoiled Votes
AWS Scaling Cheat
Sheet
▪Vertically – Increase RAM, CPU, I/O, or networking
speeds
▪Horizontally – increase the number of resources
▪ Add more EBS hard drives to storage array
ALB
Synchronous
Replication
Auto Scaling
Design
Web Site hosted in S3 Solution
S3
Browser requests
content from
CloudFront CloudFront caches Web Site
DynamoDB
▪Standby Redundancy
▪Functionality is recovered on secondary resources through failover
▪Failover takes time, can be a manual or automated process
▪Active Redundancy
▪Requests are distributed to multiple redundant compute resources
Pilot Light
Web Web
Systems
off
App App
Web Web
Systems
off
App App
Web Web
Systems
on
App App
Database Resize
Data Replication Database Capacity
(Synchronous)
Low Capacity Standby
AWS
Web Web
Low
App Capacity
App
Database Database
Data Replication
(Synchronous)
Low Capacity Standby
Web Web
Low
App Capacity
App
Database Database
Data Replication
(Synchronous)
Low Capacity Standby
Web Web
Grow
App App Capacity
Database Database
Data Replication
(Synchronous)
Active - Active
Web Web
Full
App App Capacity
Database Database
Data Replication
(Synchronous)
Q and A / Wrap-up