AWS provides a range of Compute Services, Amazon EC2, Amazon ECS, AWS Lambda, and AWS Elastic Beanstalk – allowing you to build everything from web applications, mobile backends to data processing applications.
In this session, we will provide an intro level overview of these services and highlight suitable use cases. We will discuss which service to choose to best get your applications up and running on AWS.
4. AWS Compute Offerings
• VMs
• Machine as the unit of scale
• Abstracts the hardware
• Containers
• Application as the unit of scale
• Abstracts the OS
• Serverless
• Functions as the unit of scale
• Abstracts the language runtime
ECS
EC2
Lambda
6. Amazon EC2 – Overview
Virtual Servers in the Cloud
Server
Hypervisor
VM 1 VM 2 VM 3
Physical Servers in
AWS Global Regions
7. Over 1 million active customers
across 190 countries
2,000 government agencies
5,000 educational institutions
17,500 nonprofits
12 regions
33 Availability Zones
*11 more Availability Zones
and 5 more Regions coming
online throughout the year
AWS Global Infrastructure
8. Amazon EC2 – Nine Years Ago…
First generation, single instance family and size
• m1.small (1 vCPU, 1.7 GiB RAM, 160 GB storage)
Linux only
On-Demand pricing only
12. 1 2 4 8 16 32
1
2
4
8
16
32
64
128
256
Memory(GB)
vCPU
g2.2xlarge
8 vCPU, 15 GB
1 x 60 SSD
NVIDIA GPU (1,536
CUDA cores, 4GB
Mem)
4 vCPU, 30.5 GB
i2.xlarge (High IO) - 1 x 800 SSD
d2.xlarge (Dense) - 3 x 2000
HDD
8 vCPU, 61 GB
i2.xlarge (High IO) - 2 x 800 SSD
d2.xlarge (Dense) - 6 x 2000
HDD
16 vCPU, 122 GB
i2.xlarge (High IO) - 4 x 800 SSD
d2.xlarge (Dense) - 12 x 2000
HDD
32 vCPU, 244 GB
i2.xlarge (High IO) - 8 x 800 SSD
36 vCPU, 244 GB
d2.xlarge (Dense) - 24 x 2000
HDD
m3.xlarge
4 vCPU, 15
GB
2 x 40 SSD
m3.2xlarge
8 vCPU, 30
GB
2 x 80 SSD
m3.large
2 vCPU, 7.5
GB
1 x 32 SSDm3.medium
1 vCPU, 3.75
GB,
1 x 4 SSD
t2.micro
1 vCPU,
1GB
EBS Only
t2.small
1 vCPU,
2GB
EBS Only
t2.medium
2 vCPU,
4GB
EBS Only
r3.large
2 vCPU, 15.25
GB
1 x 32 SSD
r3.xlarge
4 vCPU, 30.5 GB
1 x 80 SSD
r3.2xlarge
8 vCPU, 61 GB
1 x 160 SSD
r3.4xlarge
16 vCPU, 122 GB
1 x 320 SSD
r3.8xlarge3
2 vCPU, 244 GB
2 x 320 SSD
2 vCPU, 3.75 GB
c4.large - EBS Only
c3.large - 2 x 16 SSD
4 vCPU, 7.5 GB
c4.xlarge - EBS Only
c3.xlarge - 2 x 40
SSD
8 vCPU, 15 GB
c4.2xlarge - EBS
Only
c3.2xlarge - 2 x 80
SSD
16 vCPU, 30 GB
c4.4xlarge - EBS Only
c3.4xlarge - 2 x 160
SSD
32 vCPU, 60 GB
c4.8xlarge - EBS Only
c3.8xlarge - 2 x 320
SSD
m4.large
2 vCPU, 8 GB
EBS Only
m4.xlarge
4 vCPU, 16
GB
EBS Only
m4.2xlarge
8 vCPU, 32
GB
EBS Only
m4.4xlarge
16 vCPU, 64
GB
EBS Only
m4.10xlarge
40 vCPU, 160GB
EBS Only
m4.large
2 vCPU, 8 GB
EBS Only
Storage Optimized
GPU Instances
General Purpose
Memory Optimized
Compute Optimized
New M4’s/T2 Large
t2.nano
1 vCPU, 512MB
EBS Only
EC2 Instances: Types and Sizes
13. Locally attached or “instance storage”
Network attached:
Amazon EBS General Purpose (SSD) volumes
Amazon EBS Provisioned IOPS (SSD) volumes
Amazon EBS Magnetic volumes
Amazon EFS
Amazon S3 and Amazon Glacier for object storage
Storage Options
14. Elastic cloud-based resources
Actual demand
Resources scaled to demand
Waste Customer
dissatisfaction
Actual demand
Predicted demand
Rigid on-premises resources
Auto Scaling
15. On-Demand
Pay for compute
capacity by the
hour with no long-
term commitments
For spiky
workloads, or to
define needs
Reserved
Make a low, one-
time payment and
receive a
significant discount
on the hourly
charge
For committed
utilization
Spot
Bid for unused
capacity, charged at
a Spot Price which
fluctuates based on
supply and demand
For time-insensitive
or transient
workloads
Dedicated
Launch instances
within Amazon VPC
that run on hardware
dedicated to a single
customer
For highly sensitive
or compliance-related
workloads
Purchasing Options
16. Fast Deployments
Access computing
infrastructure in minutes
Low Cost
Pay-as-you-go pricing
Elastic
Easily add or remove capacity
Globally Accessible
Easily support customers
around the world
Secure
A collection of tools to
protect data and privacy
Scalable
Access to effectively
limitless capacity
Benefits of Cloud Servers
20. Order UI User UI
Shipping
UI
Order
Service
User
Service
Shipping
Service
A Microservices Architecture
21. Order UI User UI UI
Order
Service
Service
Shipping
Service
Order UI
Order UI
User UI UIShipping
UI
Order
ServiceOrder
Service
Service
Service
Service
Service
User
Service
Shipping
Service
Scaling a Microservices Architecture
26. Containers are Natural for Microservices
Simple to model
Any app, any language
Image is the version
Test & deploy same artifact
Stateless servers decrease change risk
28. Managing a Fleet is Hard
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
AZ 1 AZ 2
AZ 3
29. What is Amazon ECS?
Amazon EC2 Container Service (Amazon ECS) is a highly
scalable, high performance container management
service.
You can use Amazon ECS to schedule the placement of
containers across your cluster.
You can also integrate your own scheduler or third-party
scheduler to meet business or application specific
requirements.
30. Container Management at Any Scale
Nothing to run
Complete state
Control and monitoring
Scale
36. What is AWS Lambda?
AWS Lambda lets you run code without provisioning or
managing servers.
You pay only for the compute time you consume - there is
no charge when your code is not running.
Just upload your code and Lambda takes care of
everything required to run and scale your code with high
availability
37. Using AWS Lambda
Bring your own code
• Node.js, Java, Python
• Bring your own libraries
(even native ones)
Simple resource model
• Select power rating from
128 MB to 1.5 GB
• CPU and network allocated
proportionately
• Reports actual usage
Flexible authorization
• Securely grant access to
resources, including VPCs
• Fine-grained control over
who can call your functions
Flexible use
• Call or send events
• Integrated with other AWS
services
• Build whole serverless
ecosystems
38. Using AWS Lambda
Programming model
• AWS SDK built in (Python
and Node.js)
• Eclipse plugin (Java)
• Lambda is the “webserver”
• Use processes, threads,
/tmp, sockets normally
Stateless
• Persist data using Amazon
DynamoDB, S3, or
ElastiCache
• No affinity to infrastructure
(can’t “log in to the box”)
Authoring functions
• Author directly using the
console WYSIWYG editor
• Package code as a .zip and
upload to Lambda or S3
• Plugins for Eclipse and
Visual Studio
• Command line tools
Monitoring and logging
• Built-in metrics for requests,
errors, latency, and throttles
• Built-in logs in Amazon
CloudWatch Logs
39. Pay-per Request
• Buy compute time in
100 ms increments for
21 microcents
• Request charge of 20
microcents
• No hourly, daily, or
monthly minimums
• No per-device fees
Free Tier
1 million requests and 400,000 GBs of compute
every month, every customer
41. How Do I Choose?
• VMs
• “I want to configure machines,
storage, networking, and my OS”
• Containers
• “I want to run servers, configure
applications, and control scaling”
• Serverless
• “Run my code when it’s needed”
ECS
EC2
Lambda
42. If You Need to Run…
• Open-source cluster management, big data, and
database software (e.g., Mesos, Hadoop)
• Enterprise applications (e.g., SAP, Oracle, Sharepoint)
• On-premises migrations
EC2
43. If You Need to Run…
• Web applications
• Docker workloads
• Microservices
• Batch jobs
ECS
44. If You Need to Run…
Web applications
Mobile backends
IoT backends
Stream processing workloads
File processing workloads
Lambda
48. What is Amazon ECS?
Amazon EC2 Container Service (Amazon ECS) is a highly
scalable, high performance container management
service.
You can use Amazon ECS to schedule the placement of
containers across your cluster.
You can also integrate your own scheduler or third-party
scheduler to meet business or application specific
requirements.
49. Container Management at Any Scale
Nothing to run
Complete state
Control and monitoring
Scale
53. What is a Container Manager?
• Maintains available resources
• Tracks resource changes
• Accepts resource requests
• Guarantees accuracy and consistency
60. Order UI User UI
Shipping
UI
Order
Service
User
Service
Shipping
Service
A Microservices Architecture
61. Order UI User UI UI
Order
Service
Service
Shipping
Service
Order UI
Order UI
User UI UIShipping
UI
Order
ServiceOrder
Service
Service
Service
Service
Service
User
Service
Shipping
Service
Scaling a Microservices Architecture
64. Containers are Natural for Microservices
Simple to model
Any app, any language
Image is the version
Test & deploy same artifact
Stateless servers decrease change risk
66. Managing a Fleet is Hard
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
AZ 1 AZ 2
AZ 3
67. What Are Microservices Challenges?
Resource and state management
Data management
Monitoring
Service discovery
Deployment