Cloud For Beginners Course Slides
Cloud For Beginners Course Slides
RAM is non-
Central Processing
persistent
Unit (CPU)
storage
Random Access
Memory (RAM) Measurements:
Processor (CPU) Memory (RAM)
Ø CPU is measured in Gigahertz
(Ghz)
Ø RAM is measured in Gigabyte (GB)
Ø HDD is measured in Gigabyte (GB)
Files/data are loaded Ø NIC is measured in Megabits per
into memory second (Mbps) or Gigabits per
second (Gbps)
Network
Switch/Router
Network
Data is persistent Interface Card
Internet
(NIC)
Compute – Basic architecture of a computer
Network
Switch/Router
Network
Interface Card
Internet
(NIC)
Compute – Servers vs Desktops/Laptops
Desktop
Server
Laptop
Server Hardware Build:
Ø Hardware is more specialized
Ø Much higher prices compared
to desktops / laptops Servers can be used by
Ø Includes redundancy many users over a network
Compute – Client / Server Computing The client application
finds the server by IP
address
File Server
Email Server
Storage – Hard Drives
Disk Management
The Operating System
C:Volume D: (OS) sees a volume. A
8001000
GB GB200 GB volume can be partitioned
Hard drives are and formatted
block-based
storage systems
NIC
Network Switch Network Attached
Storage Server (NAS)
There is no hierarchy of
User uploads objects objects in the container
using a web browser
Object Storage
Container
Uses a REST
API
A filesystem is
“mounted” to the OS
The OS reads/writes at using a network share
the block level. Disks
can be internal, or
network attached
IP Addressing Primer
mycompany.local A 192.168.0.1
emailserver.local A 192.168.0.2
DNS Server
Network ID
00000001
Binary Values
IP Addressing Primer
192 168 0 0
. . .
= 192.168.0.0/24
255 255
. . 255 . 0
Subnet Mask
IP Addressing Primer – How many host addresses?
Class A 10 0 0 0
. . . First address = 172.16.0.0
Class B 172 16 0 0 Last address = 172.16.255.255
. . . Total addresses = 65534
Class C 192 168 0 0
. . .
First address = 192.168.0.1
Last address = 192.168.0.255
Total addresses = 255
Networking – Routers and Switches Destination Interface
192.168.0.0/24 eth0
IP Subnet A: 192.168.0.0/24 IP Subnet B: 10.0.0.0/24
10.0.0.0/24 eth1
Switch Switch
Router
192.168.0.5
10.0.0.5 10.0.0.3
192.168.0.3
192.168.0.4 10.0.0.4
POLICY PROTOCOL PORT DESTINATION SOURCE
Networking - Firewalls
ALLOW HTTP 80 INTERNAL ANY
ALLOW HTTPS 443 INTERNAL ANY
DENY ANY ANY INTERNAL ANY
Firewall Rules
IP Subnet A IP Subnet B
SELECT FirstName
FROM employees
WHERE Location = Sydney
Application servers are Database servers are
specialized computers specialized computers
running software running a database engine
Limitations:
Ø OS is tied to hardware (no portability)
Ø Hardware resources may be underutilized
Application Website
Hardware
Server
Server with Virtualization
Website
Windows OS
Many VMs can run on the
same physical hardware
This is known as a
Website
virtual server or
”virtual machine”
Windows OS
Virtual hardware is
presented to the OS
Hypervisor
The hypervisor creates a
layer of abstraction
Server
Server with Virtualization
Hypervisor
Server
Server Virtualization: Portability
Website
Windows OS
Hypervisor Hypervisor
Server Server
Server Virtualization: Portability
Website
Windows OS
Hypervisor Hypervisor
Server Server
Docker Containers
Website
Windows OS
Docker Engine
Hypervisor Windows OS
Server Server
Docker Containers
Containers are very
resource efficient
Containers start up very
quickly
Windows OS
Server
Application Programming Interfaces (APIs) – Building a house analogy
Client Builder
Application Programming Interfaces (APIs) – Building a house analogy
Electrician
Web Site
HTTP Protocol
API
Client RESTful API Application
Instructions are sent to
API using the HTTP
protocol
Database
SECTION 3
Cloud Computing
Overview
Legacy IT / Traditional IT This model is very
capital intensive
Corporate
data center
The IT equipment
is owned by the
company
A company typically
leases space in a data
center, or may own the
whole building
Router Switch Firewall
Backup System
Legacy IT / Traditional IT
Corporate
data center
Corporate Office
Corporate
data center
Costs:
Ø Data center building
Ø Data center security
Ø Physical IT hardware
Ø Software licensing costs
Servers Storage Servers Ø Maintenance contracts
Ø Power
Ø Internet connectivity
Ø Staff wages (design, build,
operations, maintenance)
Name Description
On-demand, self-service A user can consume cloud resources, as needed, automatically,
and without human interaction
Broad network access Capabilities are available over the network using standard
mechanisms. Can be the Internet or a Wide Area Network
(WAN)
Resource pooling The providers resources are pooled and serve multiple
consumers using a multi-tenant model
Rapid elasticity Capabilities can scale “elastically” based on demand
3-6 months
Deploying an eCommerce Website in the Cloud
Customers connect
over the Internet to
place orders
AWS Cloud
Customers
Corporate Office
Website Database
Admin
The Internet
aws s3 ls s3://mys3databucket
Java WebApp
Hypervisor
Server
Cloud Service Models: Infrastructure as a Service (IaaS)
Examples:
Java WebApp Ø Amazon Elastic Compute Cloud (EC2)
Ø Azure Virtual Machines
Data Ø Google Compute Engine
Managed
by you
Java Runtime
Linux OS
Cloud Service Models: Platform as a Service (PaaS)
Examples:
Java WebApp Ø AWS Elastic Beanstalk
Managed Ø Azure WebApps
by you Ø Compute App Engine
Data
Cloud Service Models: Software as a Service (SaaS)
Managed Examples:
Java WebApp Ø Google Apps
by you
Ø Salesforce.com
Ø Zoom
Pure consumption
model
Cloud Service Models: Comparison
Private Cloud IaaS PaaS SaaS
Java WebApp
Java WebApp Java WebApp Java WebApp
Public Cloud The IT services that you consume are hosted and AWS, Microsoft Azure,
delivered from a third-party and accessed over the Google Cloud Platform
Internet
Hybrid Cloud A combination of on-premises, private cloud, and
public cloud services are consumed
Multicloud Usage of two or more public clouds at a time, and
possibly multiple private clouds
Deployment Models – Private Cloud
Data center
Benefits
Ø Complete control of the
entire stack
Ø Security – in a few
cases, organizations
may need to keep all or
some of their
Network & Firewall Virtualization Cluster Storage & Backup applications and data in
house
Benefits:
Ø Variable expense, instead of capital expense
Public Cloud
Ø Economies of scale
Ø Massive elasticity AWS Cloud
Corporate Office
Compute
Storage
Network Database
The Internet
Benefits:
Ø Allows companies to keep the critical applications and sensitive data in a traditional
data center environment or private cloud
Ø Take advantage of public cloud resources like SaaS, for the latest applications, and
IaaS, for elastic virtual resources
Ø Facilitates portability of data, apps and services and more choices for deployment
models
Public Cloud
AWS Cloud
Private Cloud
Data center
Stateless: Stateful:
Netflix records
No “state” is what has been
recorded about watched
the user's session
Person check a
news website Person logs into
Netflix
Stateful vs Stateless Applications
No data is stored
on the web server,
it is stateless
eCommerce Application
No data is stored
on the web server,
it is stateless
eCommerce Application
Application
Windows OS
Server
Scalability and Elasticity: Scaling Up
Application
Windows OS
Scaling up means
adding resources to
the server
Server
Scalability and Elasticity: Scaling Up
Application
Windows OS
Scaling up means
adding resources to
the server
Server
Scalability and Elasticity: Scaling Out
Application
Windows OS
Server
Scalability and Elasticity: Scaling Out
Application
Windows OS
Server
Scalability and Elasticity: Scaling Out
Application Application
Scaling out means
adding additional
servers Windows OS Windows OS
Application Application
Windows OS Windows OS
Server Server
Load Balancing
Web Server 1
User 1
Network Card
Web Server 1
User 1
Web Server 2
Web Server 3
User 3
Web Server 4
High Availability and Fault Tolerance
Cloud
Think of an availability
Availability Zone zone as a separate
data center
Web Server 5
Web Server 3
User 3
Web Server 4
High Availability and Fault Tolerance
Cloud
Think of an availability
Availability Zone zone as a separate
data center
Web Server 1
User 1
Web Server 5
User 2
Load Balancer
User 3
Tight Coupling
Message Queue
Producers send
messages to the queue
Loose Coupling
Order Account
Service Management
Payment Shipping
Service Service
Database
Monolithic Application
Monolithic Application
Linux OS
User 1
Monolithic Application
Linux OS
Load Balancer User 2
Linux OS
Monolithic Application
Order Account
Service Management
Payment Shipping
Service Service
Database
A microservice is an
Microservices Architecture independently
deployable unit of code
Shipping
Microservice
Order
Microservice
Docker Engine
Linux OS
Server
Microservices using Docker Containers
Use of Application Programming Interfaces (APIs) Easier integrations between application components;
assists with loose coupling
Speed and agility Fast to deploy and update. Easy to include high availability
and fault tolerance for each microservice
Event-driven Architecture
eCommerce Application
User places an
order
Event-driven Architecture
eCommerce Application
User places an
order
Event-driven Architecture
eCommerce Application
eCommerce Application
Internally
launched in
2002
Vision set out for AWS
publicly with potential
for public offerings 2003
Amazon SQS
public launch
2004
Re-launch with
S3, SQS, EC2
2006
All amazon.com
retail sites migrated
to AWS 2010
Sales of $1.57
billion 2015
Revenue of $25
billion 2018
Amazon Web Services (AWS)
This is actually a
snapshot of AWS
services from a few
years ago..
Region – us-east-1
Every region is connected
via a high bandwidth, fully Availability Availability Availability
redundant network Zone Zone Zone
Quantity of data
that is
transferred out
from all services
Quantity of data
Amount of resources stored
such as CPU and
RAM and duration
AWS Identity and Access Management Service (IAM)
EJPx!*21p9%
Region
VPC
Main Route Table
Subnets are
created within
Availability Zone Destination Target
AZs Public subnet
172.31.0.0/16 Local
0.0.0.0/0 igw-id
EC2 Instance
An Internet Gateway is
used to connect to the
Internet
Multiple VPCs
VPC VPC
CIDR 172.31.0.0/16 CIDR 10.0.0.0/16
AWS Cloud
VPC
Availability Zone
Public subnet
Private services can
Amazon DynamoDB Amazon S3 have public IP
addresses but exist
within the VPC
Availability Zone
Availability Zone
Router
Private subnet Public subnet
Security Security
Group B Group A
Security Security
Group A Groups can be
applied to Network ACL
Network ACL
instances in
any subnet
Stateful vs Stateless Firewalls
EC2 instances
run Windows or
Linux OS
An EC2 instance
is a virtual server
Type Description
Public IP address Lost when the instance is stopped
No charge
Region
EC2 Instance
Region
Destination Target
EC2 Instance
172.31.0.0/16 Local
0.0.0.0/0 nat-gateway-id
Launching an Amazon EC2 instance
EBS Snapshot
Memory optimized r5ad.large 2 16
Storage optimized d2.xlarge 4 30.5
GPU instances g2.2xlarge 8 15
Linux Microsoft
Windows
Using Key Pairs with Amazon EC2
AWS Cloud
Public subnet
AWS CLI configured
with key pair
Private subnet
AWS Cloud
VPC
IAM Role
S3 Bucket EC2 Instance
Private subnet
Policy
Amazon EC2 Auto Scaling
Auto Scaling
launches extra
instance
EC2 Status
EC2 Instances Auto Scaling group EC2 Instances
Checks fail
CloudWatch
notifies Auto
Scaling to scale
ASG replaces
failed instance
Availability Zone
Public subnet
Instance 2
Auto Scaling
Availability Zone User 2
Public subnet
Elastic Load
Balancer
Instance 3 User 3
User 1 is
connected to
instance 4
Instance 4
Amazon Elastic Load Balancing
Availability Zone
Public subnet
Instance 2
Auto Scaling User 2
Availability Zone
Public subnet
Elastic Load
Balancer
User 3
Instance 3
Instance 4 User 4
HDD/SSD
File system On-premises client
Volume
REST API: GET, PUT,
Uses the NFS POST, SELECT, DELETE
Protocol
Linux only
/dev/xvdf Object
Availability Zone Availability Zone
or C:
/efs-mnt /efs-mnt
Availability Zone
The volume is
mounted over a
network
C: D:
EC2 Instance
Amazon Elastic Block Store (EBS)
Availability Zone A
/efs-mnt /efs-mnt
Object
Internet EC2 Instance
An objects consists of: gateway
Ø Key (name of objects) Public Internet
Ø Version ID EC2 instances Private subnet
Internet Client
SECTION 8
AWS Databases
Amazon Relational Database Service (RDS)
RDS is a managed,
relational database
Amazon RDS
EC2
db.m4.2xlarge 4
M4 Instance vCPUs, 32 GiB
RAM
M4 instance
db.m4.large 2
vCPUs, 8 GiB
RAM
Amazon RDS – Disaster Recovery (DR) and Scaling Out (horizontally)
Region
VPC
Application servers can
Availability Zone
read from the read replica
and write to the master
Multi-AZ creates a
Writes
passive standby.
Primarily used for RDS Standby Writes EC2 App Server EC2 App Server
disaster recovery
Synchronous
replication
Availability Zone Reads only
Asynchronous
replication
Read Replicas are used
RDS Master RDS Read Replica for scaling database
queries (reads)
Amazon DynamoDB
Fully managed
service. You create Offers seamless,
tables on an existing horizontal, scaling
database
DynamoDB Table
Data is replicated
across multiple AZs
within a region
DynamoDB is a NoSQL,
key-value type of database
Amazon DynamoDB
Ø DynamoDB is made up of:
Ø Tables
Ø Items
userid orderid book price date
Ø Attributes
user001 1000092 ISBN100.. 9.99 2020.04..
CloudFormation creates
and configures resources
according the the template
AWS Elastic Beanstalk
Region
VPC
Elastic Beanstalk environment
Code repository
could be GitHub,
CodeCommit etc.
Results returned to
Developer Developer
pushes code
Continuous Integration & Continuous Delivery
AWS CodePipeline
Results returned to
Developer Developer
pushes code
Application Application
AWS CodePipeline with Elastic Beanstalk
AWS CodePipeline
Node.js App
Developer
AWS CodeStar IDE connects to
CodeStar
Amazon Route 53
.net example.com
.com dctlabs.com
.org
EC2 Instances
DNS Resolution
mycompany.local A 192.168.0.1
emailserver.local A 192.168.0.2
DNS Server
Amazon Route 53
A hosted zone represents a
set of records belonging to a
domain
What’s the address for
example.com? example.com
Region
VPC
Address is 8.1.2.1
Availability Zone
Public subnet
Edge location
Edge location
Edge location
Users
Users Edge location
Users
Users
SECTION 12
Containers and
Serverless
Amazon Elastic Container Service (ECS)
ECS Cluster
Task Definition
Task Task Task Task
{
"containerDefinitions": [
{
"name": "wordpress",
"links": [
Task Task Task Task "mysql"
],
"image": "wordpress",
"essential": true,
An ECS Task is a "portMappings": [
{
running Docker "containerPort": 80,
"hostPort": 80
container }
],
"memory": 500,
"cpu": 10
}
Code is executed
Developer uploads
some code
Region
Event is written to
CloudWatch Logs Run test event
Lambda
Decoupling
Email
SMS
Text
Amazon Simple Queue Service (SQS)
Direct integration
Decoupled integration
Auto Scaling Group Auto Scaling Group
Queue
Amazon Simple Queue
Service
EC2 instance
Web Tier polls SQS App Tier
AWS Lambda to Amazon SQS Event Source Mapping
Add message to
SQS queue
Region
Amazon CloudWatch
Serverless application: Amazon SQS, SNS, and Lambda
Amazon CloudWatch
Event is written to
CloudWatch Logs
Submit notification
to SNS Topic
User
SECTION 14
Get Certified on AWS
Why work in cloud computing?
1) Job demand
2) Globally relevant skills
3) Rewarding career paths
4) Great salaries
Why get AWS certified?