58
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sebastian Dreisch, Global Bus DevCompute Services April 19, 2016 Getting Started with Amazon EC2 and AWS Compute Services

Getting Started with Amazon EC2 and Compute Services

Embed Size (px)

Citation preview

Page 1: Getting Started with Amazon EC2 and Compute Services

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Sebastian Dreisch, Global Bus Dev—Compute Services

April 19, 2016

Getting Started with Amazon EC2

and AWS Compute Services

Page 2: Getting Started with Amazon EC2 and Compute Services

AWS compute offerings

AWS LambdaServerless compute

platform for stateless

code execution in

response to triggers

Amazon ECSContainer management

service for running

Docker on a managed

cluster of EC2

Amazon EC2Virtual servers in

the cloud

Page 3: Getting Started with Amazon EC2 and Compute Services

EC2—Virtual servers

in the cloud?

Page 4: Getting Started with Amazon EC2 and Compute Services

AWS global infrastructure

Over 1 million active customers

across 190 countries

2000 government agencies

5000 educational institutions

17,500 nonprofits

12 AWS Regions

33 Availability Zones

*11 more Availability Zones

and 5 more regions coming

online throughout the year

Page 5: Getting Started with Amazon EC2 and Compute Services

Amazon Elastic Compute Cloud (EC2)—

Elastic virtual servers in the cloud

Physical servers in global AWS Regions

Host server

Hypervisor

Guest 1 Guest 2 Guest n

Page 6: Getting Started with Amazon EC2 and Compute Services

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

Page 7: Getting Started with Amazon EC2 and Compute Services

EC2 instances today

c4.largeInstance family

Instance generation

Instance size

Page 8: Getting Started with Amazon EC2 and Compute Services

Performance factor: CPU

Intel Xeon E5-2670 (Sandy Bridge) CPUs

• Available on M3, CC2, CR1, and G2 instance types

Intel Xeon E5-2680 v2 (Ivy Bridge) CPUs

• Available on C3, R3, and I2 instance types

• 2.8 GHz in C3, Turbo enabled up to 3.6 GHz

• Supports Enhanced Advanced Vector Extensions (AVX)

instructions

Intel Xeon E5-2666 v3 (Haswell – AVX2) CPUs

• Available on C4, D2, and M4 instance types

• 2.9 GHz in C4, Turbo enabled up to 3.5 GHz (with Intel Turbo

Boost)

• Supports AVX2 instructions

Page 9: Getting Started with Amazon EC2 and Compute Services

http://aws.amazon.com/ec2/instance-types/

Page 10: Getting Started with Amazon EC2 and Compute Services

1 2 4 8 16 321

2

4

8

16

32

64

128

256

Me

mo

ry (

GB

)

vCPU

g2.2xlarge8 vCPU, 15 GB1 x 60 SSDNVIDIA GPU (1,536 CUDA cores, 4GB Mem)

4 vCPU, 30.5 GBi2.xlarge (High IO)—1 x 800 SSDd2.xlarge (Dense)—3 x 2000 HDD

8 vCPU, 61 GBi2.2xlarge (High IO)—2x800 SSDd2.2xlarge (Dense)—6 x 2000 HDD

16 vCPU, 122 GBi2.4xlarge (High IO)—4x800 SSDd2.4xlarge (Dense)—12x2000 HDD

32 vCPU, 244 GBi2.8xlarge (High IO)—8x800 SSD

36 vCPU, 244 GBd2.8xlarge (Dense)—24x2000 HDD

m3.xlarge4 vCPU, 15 GB2 x 40 SSD

m3.2xlarge8 vCPU, 30 GB2 x 80 SSD

m3.large2 vCPU, 7.5 GB1 x 32 SSDm3.medium

1 vCPU, 3.75 GB, 1 x 4 SSD

t2.micro1 vCPU, 1GBEBS Only

t2.small1 vCPU, 2GBEBS Only

t2.medium2 vCPU, 4GBEBS Only

r3.large2 vCPU, 15.25 GB1 x 32 SSD

r3.xlarge4 vCPU, 30.5 GB1 x 80 SSD

r3.2xlarge8 vCPU, 61 GB1 x 160 SSD

r3.4xlarge16 vCPU, 122 GB1 x 320 SSD

r3.8xlarge2 vCPU, 244 GB2 x 320 SSD

2 vCPU, 3.75 GBc4.large—EBS Onlyc3.large—2 x 16 SSD

4 vCPU, 7.5 GBc4.xlarge—EBS Onlyc3.xlarge—2 x 40 SSD

8 vCPU, 15 GBc4.2xlarge—EBS Onlyc3.2xlarge—2 x 80 SSD

32 vCPU, 60 GBc4.8xlarge—EBS Onlyc3.8xlarge—2 x 320 SSD

m4.large2 vCPU, 8 GBEBS Only

m4.xlarge4 vCPU, 16 GBEBS Only

m4.2xlarge8 vCPU, 32 GBEBS Only

m4.4xlarge16 vCPU, 64 GBEBS Only

m4.10xlarge40 vCPU, 160GBEBS Only

t2.large2 vCPU, 8 GBEBS Only

Storage Optimized

GPU Instances

General Purpose

Memory Optimized

Compute Optimized

New M4’s/T2 Large

t2.nano1 vCPU, 512MBEBS Only

g2.8xlarge32vCPU, 60 GB2 x 120 SSD4 NVIDIA GPUs (1,536 CUDA cores, 4GB Mem)

16 vCPU, 30 GBc4.4xlarge—EBS Onlyc3.4xlarge—2 x 160 SSD

39 (latest generations) EC2 instance types

Page 11: Getting Started with Amazon EC2 and Compute Services

Storage options

Locally attached or “instance storage”

Network attached:

Amazon EBS General Purpose (SSD) volumes

Amazon EBS Provisioned IOPS (SSD) volumes

Amazon EBS Magnetic volumes (multiple types for different use cases)

Amazon EFS (seconds to create a scalable shared NFSv4 file system)

Amazon S3 and Amazon Glacier for object storage

Page 12: Getting Started with Amazon EC2 and Compute Services

EC2—Why use servers in the

cloud?

Page 13: Getting Started with Amazon EC2 and Compute Services

Fast deploymentsAccess computing

infrastructure in minutes

Low costPay-as-you-go pricing

ElasticEasily add or remove capacity

Globally accessibleEasily support customers

around the world

SecureA collection of tools to

protect data and privacy

ScalableAccess to effectively

limitless capacity

Page 14: Getting Started with Amazon EC2 and Compute Services

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Serv

er

load

Hour of day

Page 15: Getting Started with Amazon EC2 and Compute Services

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Serv

er

load

Hour of day

Capacity of 1 server

Page 16: Getting Started with Amazon EC2 and Compute Services

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Serv

er

load

Hour of day

Capacity of 1 server

Traditional capacity required

Page 17: Getting Started with Amazon EC2 and Compute Services

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Serv

er

load

Hour of day

Capacity of 1 server

Traditional capacity required

1 server for 8 hours

Page 18: Getting Started with Amazon EC2 and Compute Services

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Serv

er

load

Hour of day

Capacity of 1 server

Traditional capacity required

1 server for 8 hours 1 server for 8 hours

Page 19: Getting Started with Amazon EC2 and Compute Services

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Serv

er

load

Hour of day

Capacity of 1 server

Traditional capacity required

1 server for 8 hours 1 server for 8 hours

1 server for 8 hours

Page 20: Getting Started with Amazon EC2 and Compute Services

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Serv

er

load

Hour of day

Capacity of 1 server

Traditional capacity required

1 server for 8 hours 1 server for 8 hours

1 server for 8 hours

1 server for 8 hours

Page 21: Getting Started with Amazon EC2 and Compute Services

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Serv

er

load

Hour of day

Capacity of 1 server

Traditional capacity required

1/3rd

saving

Page 22: Getting Started with Amazon EC2 and Compute Services

0

1

2

3

4

5

6

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30

Insta

nce c

ou

nt

Day of month

Page 23: Getting Started with Amazon EC2 and Compute Services

0

1

2

3

4

5

6

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30

Insta

nce c

ou

nt

Day of month

Monthly

predictable

peak

processing

Page 24: Getting Started with Amazon EC2 and Compute Services

0

1

2

3

4

5

6

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30

Insta

nce c

ou

nt

Day of month

Traditional capacity required

Page 25: Getting Started with Amazon EC2 and Compute Services

0

1

2

3

4

5

6

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30

Insta

nce c

ou

nt

Day of month

Elastic capacity

Traditional capacity required

Page 26: Getting Started with Amazon EC2 and Compute Services

0

1

2

3

4

5

6

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30

Insta

nce c

ou

nt

Day of month

75% savings

Traditional capacity required

Elastic capacity

Page 27: Getting Started with Amazon EC2 and Compute Services

Tooling—scale automatically

Amazon EC2 Auto Scaling Elastic Load Balancing

Actual

EC2

Elastic virtual

servers in the cloud

Dynamic traffic

distributionAutomated scaling of

EC2 capacity

Page 28: Getting Started with Amazon EC2 and Compute Services

2007 2008 2009 2010 2011 2012 2013 2014 2015

9 24 48 61 82159

280

514

722

Rapid pace of customer driven improvements

There is no compression algorithm for experience

AWS feature and service launches(Above & beyond all the regular updates to the infrastructure platform)

Page 29: Getting Started with Amazon EC2 and Compute Services

Rapid pace of customer driven improvements

Security—Our Top priority!

AWS feature and service launches(Above & beyond all the regular updates to the infrastructure platform)

2007 2008 2009 2010 2011 2012 2013 2014

9 24 48 61 82159

280

514

Security, compliance, governance,and/or audit capabilities

Page 30: Getting Started with Amazon EC2 and Compute Services

Consistent, regular, exhaustive 3rd party evaluations

• Secured premises

• Secured access

• Built-in firewalls

• Unique users

• Multi-factor authentication

• Private subnets

• Encrypted data storage

• Dedicated connection

Architected for enterprise security

Page 31: Getting Started with Amazon EC2 and Compute Services

EC2—How do I get started?

Page 32: Getting Started with Amazon EC2 and Compute Services

http://aws.amazon.com/getting-started/

Just get started—for free! (AWS console)

Page 33: Getting Started with Amazon EC2 and Compute Services

Use the AWS Marketplace

Browse, search, discover,

and launch thousand of AWS

Marketplace Amazon

Machine Images (AMIs)

directly from within the

Amazon EC2 console

2,500+ products listed in 35

categories

Software listings from more

than 800 ISVs

Page 34: Getting Started with Amazon EC2 and Compute Services

Build reliable architectures

Easily build highly available applications

Elastic Load Balancing distributes load

Auto Scaling helps ensure availability and scale

Use multiple Availability Zones (AZs)

Use multiple global AWS Regions

Page 35: Getting Started with Amazon EC2 and Compute Services

Example: three-tier web application architecture

Page 36: Getting Started with Amazon EC2 and Compute Services

Build secure architectures

Use Amazon VPC—Provision a logically isolated section of the AWS cloud

Control your virtual networking environment with:• Subnets

• Route tables

• Security groups

• Network ACLs

• Flow logging (new!)

Control if and how your instances access the Internet

Connect to your on-premises network by using a hardware VPN or AWS Direct Connect

Monitor all changes via Amazon CloudWatch Logs and AWS CloudTrail

Page 37: Getting Started with Amazon EC2 and Compute Services

Availability Zone 1a Availability Zone 1b

Internet

10.0.0.5

10.0.0.6

10.0.3.17

10.0.3.5

10.0.1.5

10.0.1.25

10.0.1.8

10.0.1.6

VPC Subnet

VPC Subnet

VPC Subnet

Virtual Private Gateway

Customer Gateway

VPN Connection

Internet Gateway

Customer Data Center

Page 38: Getting Started with Amazon EC2 and Compute Services

Example: enterprise application architecture

Page 39: Getting Started with Amazon EC2 and Compute Services

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 BYOL and highly

sensitive/regulated

workloads

Use a purchasing option (mix) that best fits your workload

Page 40: Getting Started with Amazon EC2 and Compute Services

RIs for cost savings and reserved capacity

The No Upfront Reserved Instance option provides a discount compared to On-Demand (up to 55% off) and does not require an upfront payment.

The Partial Upfront option balances the payments of an RI between upfront and hourly and provides a higher discount (up to 76%) compared to the No Upfront option.

With the All Upfront option you benefit from the highest discount compared to On-Demand (up to 77% off)

$-

$500

$1,000

$1,500

$2,000

$2,500

$3,000

30% 40% 50% 60% 70% 80% 90% 100%

Utilization

m3.xlarge 1yr OD/RI Break Even Utilization

On Demand

No Upfront

Partial Upfront

All Upfront

Page 41: Getting Started with Amazon EC2 and Compute Services

Spot for interruptible workloads and best pricing

Best Spot use-cases include any batch-oriented, fault-tolerant application

Page 42: Getting Started with Amazon EC2 and Compute Services

What have customers done on EC2?

18 hours

205,000 materials analyzed

156,314 AWS Spot cores at peak

2.3M core hours

Total spending: $33K

(Under 1.5 cents per core-hour)

Page 43: Getting Started with Amazon EC2 and Compute Services

Use Dedicated Hosts to enable BYOL

Host ID = h-123abc

Sockets = 2

Physical Cores = 20

• Granular resource and placement controls• Dedicated Host allocation

• Granular instance placement

• Instance-host affinity

• Visibility into physical resources • Physical core and socket counts

• Capacity utilization

• Instance location

Page 44: Getting Started with Amazon EC2 and Compute Services

Dedicated Host Configurations

A c3.xlarge Dedicated Host provides capacity for 8

c3.xlarge instances. Every c3 Dedicated Host is

supported by 2 sockets and 20 physical cores.

Dedicated Host Attributes # of Instances Per Host by Instance Size

Instance

Family Sockets

Physical

Cores medium large xlarge 2xlarge 4xlarge 8xlarge 10xlarge

c3 2 20 - 16 8 4 2 1 -

c4 2 20 - 16 8 4 2 1 -

g2 2 20 - - - 4 - 1 -

m3 2 20 32 16 8 4 - - -

d2 2 24 - - 8 4 2 1 -

r3 2 20 - 16 8 4 2 1 -

m4 2 24 - 22 11 5 2 - 1

i2 2 20 - - 8 4 2 1 -

Page 45: Getting Started with Amazon EC2 and Compute Services

ECS—Why use it?

Page 46: Getting Started with Amazon EC2 and Compute Services

Amazon EC2 Container Service is a highly scalable, high

performance container management service that supports

Docker containers and allows you to easily run applications

on a managed cluster of Amazon EC2 instances.

Page 47: Getting Started with Amazon EC2 and Compute Services

EC2 Container Service

Docker

Task

Container Instance

Amazon

ECS

Container

ECS Agent

ELB

Internet

ELB

User /

Scheduler

API

Cluster Management Engine

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

Docker

Task

Container Instance

Container

ECS Agent

Task

Container

AZ 1 AZ 2

Key/Value Store

Agent Communication Service

Page 48: Getting Started with Amazon EC2 and Compute Services

It’s easy and FREE!

Please visit:

https://aws.amazon.com/ecs/getting-started/

Page 49: Getting Started with Amazon EC2 and Compute Services

Lambda—Serverless code

execution?

Page 50: Getting Started with Amazon EC2 and Compute Services

High performance at

any scale; cost-

effective and efficient

No infrastructure to

manage

Pay only for what you use:

Lambda automatically

matches capacity to your

request rate. Purchase

compute in 100 ms

increments.

Bring Your Own

Code

Stateless, trigger-based code execution

Run code in a choice of

standard languages. Use

threads, processes, files,

and shell scripts normally.

Focus on business logic, not

infrastructure. You upload

code; AWS Lambda handles

everything else.

AWS Lambda functions

Page 51: Getting Started with Amazon EC2 and Compute Services

Lambda—Why use it?

Page 52: Getting Started with Amazon EC2 and Compute Services

No server is easier to manage

than no server

Page 53: Getting Started with Amazon EC2 and Compute Services

Lambda—How do I use it?

Page 54: Getting Started with Amazon EC2 and Compute Services

Key Lambda scenarios

Data processing

Stateless processing of

discrete or streaming

updates to your data

store or message bus

Control systems

Customize responses

and response workflows

to state and data

changes within AWS

App back-end

development

Execute server side

backend logic in a cross

platform fashion

Page 55: Getting Started with Amazon EC2 and Compute Services

AWS Lambda use cases—data processing

Page 56: Getting Started with Amazon EC2 and Compute Services

AWS Lambda use cases

Threat intelligence

and analytics

Ad data analytics

and routingMobile app

analytics

Image content

filtering

Real-time video ad

bidding

News content

processing

Game metrics

analyticsGene sequence

search

Page 57: Getting Started with Amazon EC2 and Compute Services

Please tell us about what you are

building next!

Page 58: Getting Started with Amazon EC2 and Compute Services