SlideShare a Scribd company logo
AWS re:INVENT
Use Amazon EC2 Spot Instances to
Deploy a Deep Learning Framework
on Amazon ECS
H u b e r t C h e u n g , A W S S o l u t i o n s A r c h i t e c t
A n d y M u i , A W S S o l u t i o n s A r c h i t e c t
D a v i d K u o , A W S S o l u t i o n s A r c h i t e c t
N o v e m b e r 2 7 , 2 0 1 7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
BEFORE WE GET STARTED
• Is everyone connected to Wi-Fi? Power?
• You will be using your own AWS account in this workshop
• Does everyone have the credits?
• If your AWS account is < 24 hours old, or if you have never
launched an Amazon Elastic Compute Cloud (Amazon EC2)
instance in your account, please raise your hand and
provide your AWS account number to one of us
• Please complete the evaluation in the app
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WHAT TO EXPECT
• Hands-on, self-paced workshop
• Introduction to MXNet and containers
• Overview of Amazon EC2 Container Service (Amazon ECS)
and Amazon EC2 Container Registry (Amazon ECR)
• Overview of Amazon EC2 Spot Instances
• Why use Amazon ECS and Amazon EC2 Spot Instances
together
• Most importantly—work together and have some fun!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MXNET AND CONTAINERS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MXNet
• Open-source deep learning
framework—
https://github.com/dmlc/mxnet
• Define, train, and deploy deep neural
networks
• Highly scalable—single/multiple hosts,
CPU/GPU support
• Support for multiple languages
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WHY CONTAINERS?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CONTAINERS INCREASE AGILITY
Portability
Same immutable images; run anywhere
Flexibility
Create modular environments; decompose
apps
Speed
Speeds up build and release cycle
Efficiency
Optimize resource utilization
Agility
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AMAZON EC2 CONTAINER SERVICE
(AMAZON ECS)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AMAZON ECS BENEFITS
Easily Manage Clusters
for Any Scale
Flexible Container
Placement
Designed for Use with
Other AWS Services
Extensible Performance at Scale Secure
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ARCHITECTURE
Container Instance
Cluster
Agent
Task
Agent
Task
Container
Task
Container
Run Task Schedule Task
Task Definition Task + Service Definition
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AMAZON ECR USAGE
Amazon
ECR
Task
Definition
ECS
aws_account_id.dkr.ecr.us-west-
2.amazonaws.com/image_name:latest
Image url Image url
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLOUDFORMATION
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
BENEFITS
Templated
resource
provisioning
Infrastructure
as code
Declarative
and flexible
Easy to use
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WORKFLOW
Template AWS CloudFormation Stack
JSON or YAML
formatted file
Parameter definition
Resource creation
Configuration actions
Configured AWS resources
Comprehensive service support
Service event aware
Customizable
Framework
Stack creation
Stack updates
Error detection and rollback
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AMAZON EC2 SPOT INSTANCES
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AMAZON EC2 CONSUMPTION MODELS
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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WHAT ARE SPOT INSTANCES?
Amazon EC2 Spot Instances are
spare Amazon EC2 On-Demand capacity
with very simple rules…
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SPOT RULES ARE SIMPLE
Markets where the price of
compute changes based on
supply and demand
You’ll never pay more than your
bid; when the market exceeds
your bid you get 2 minutes to
wrap up your work
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SHOW ME THE MARKETS!
$0.27 $0.29$0.50
1b 1c1a
8XL
$0.30 $0.16$0.214XL
$0.07 $0.08$0.082XL
$0.05 $0.04$0.04XL
$0.01 $0.04$0.01L
C4
$1.76
On
Demand
$0.88
$0.44
$.22
$0.11
Each instance family
Each instance size
Each Availability Zone
In every Region
Is a separate Spot Market
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
BID PRICE AS OPPOSED TO MARKET PRICE
50% Bid
75% Bid
You pay the
market
price
25% Bid
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WHY AMAZON ECS AND SPOT
INSTANCES?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1. BEST VALUE FOR AMAZON EC2
CAPACITY
• Since Spot Instances typically cost 50-90% less than on-
demand, you can increase your compute capacity by 2-10x within
the same budget
• Or you could save 50-90% on your existing workload
• Either way, you should try it!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2. DIVERSIFICATION WITH SPOT FLEET
• Containers are a natural fit for a diverse allocation of
resources—ECS just sees a pool of resources
• Spot Fleet thrives on diversification—across instance types,
instance sizes, and Availability Zones
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3. LOWEST PRICE WITH SPOT FLEET
• The ECS runtask scheduler randomly distributes tasks across
your cluster (typically used for batch jobs)
• Spot Fleet has a built-in allocation strategy of lowest price
• Also don’t forget about Spot Blocks
(run Spot Instances without interruption for 1 to 6 hours)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WORKSHOP: IMAGE CLASSIFICATION
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
OVERALL ARCHITECTURE
Amazon
S3
AWS CLI
Public subnet – AZ #1 Public subnet – AZ #2
Amazon
ECS
Spot Instance Spot Instance
Spot Fleet
>_ SSH
Amazon
ECR
AWS Management
Console
RunTask
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 1: SET UP ENVIRONMENT
Amazon
S3
Public subnet – AZ #1 Public subnet – AZ #2
Amazon
ECS
Spot Instance Spot Instance
Spot Fleet
Amazon
ECR
AWS
CloudFormation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 2: BUILD AN MXNET DOCKER IMAGE
Amazon
ECR
Subnet
Amazon
ECS
Spot Instance
Task
Definition
Image url
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 3: DEPLOY MXNET TO AMAZON ECS
Amazon
S3
Public subnet – AZ #1 Public subnet – AZ #2
Amazon
ECS
Spot Instance Spot Instance
Spot Fleet
Amazon
ECR
AWS Management
Console
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 4: IMAGE CLASSFICATION DEMO
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LAB 5: IMAGE CLASSIFICATION IN TASK
Amazon
S3
Public subnet – AZ #1 Public subnet – AZ #2
Amazon
ECS
Spot Instance Spot Instance
Spot Fleet
Amazon
ECR
AWS Management
Console
RunTask
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SOME POINTERS…
• Apply your AWS Credits.
• https://aws.amazon.com/awscredits/
• This is a self-paced lab. Don’t stress to finish here. You
can access the content from GitHub anytime.
• The value-add of doing the workshop here is being
together. Don’t be shy. Ask questions.
• Work together. Collaborate. Most importantly, have
fun!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LET’S GET STARTED!
https://github.com/awslabs/ecs-deep-
learning-workshop
Follow the lab guide! Raise your hand if you have
questions.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
APPENDIX
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
APPLY YOUR CREDITS
https://aws.amazon.com/awscredits/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WORKSHOP CLEANUP
1. Delete the CloudFormation stack
2. Check what resources CloudFormation was not able to
delete (it won’t delete things it did not create or that
were modified)
1. Amazon S3 bucket
2. Amazon ECR repository
3. Delete the CloudFormation stack again
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EVALUATIONS
Please don’t forget to complete the workshop
evaluation in the app!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
RELATED SESSIONS
• CON202 - Getting Started with Docker and
Amazon ECS
• MCL303 - Deep Learning with Apache MXNet and
Gluon
• MCL310 - Building Deep Learning Applications with
Apache MXNet and Gluon
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!

More Related Content

What's hot

MCL303-Deep Learning with Apache MXNet and Gluon
MCL303-Deep Learning with Apache MXNet and GluonMCL303-Deep Learning with Apache MXNet and Gluon
MCL303-Deep Learning with Apache MXNet and Gluon
Amazon Web Services
 
MAE401_Designing for DisneyMarvel Studio-Grade Security
MAE401_Designing for DisneyMarvel Studio-Grade SecurityMAE401_Designing for DisneyMarvel Studio-Grade Security
MAE401_Designing for DisneyMarvel Studio-Grade Security
Amazon Web Services
 
MAE304-Turners Cloud Archive for CNN's Video Library and Global Multiplatform...
MAE304-Turners Cloud Archive for CNN's Video Library and Global Multiplatform...MAE304-Turners Cloud Archive for CNN's Video Library and Global Multiplatform...
MAE304-Turners Cloud Archive for CNN's Video Library and Global Multiplatform...
Amazon Web Services
 
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
Amazon Web Services
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Amazon Web Services
 
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdfWPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
Amazon Web Services
 
DVC304_Compliance and Top Security Threats in the Cloud—Are You Protected
DVC304_Compliance and Top Security Threats in the Cloud—Are You ProtectedDVC304_Compliance and Top Security Threats in the Cloud—Are You Protected
DVC304_Compliance and Top Security Threats in the Cloud—Are You Protected
Amazon Web Services
 
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
Amazon Web Services
 
Best Practices for Distributed Machine Learning and Predictive Analytics Usin...
Best Practices for Distributed Machine Learning and Predictive Analytics Usin...Best Practices for Distributed Machine Learning and Predictive Analytics Usin...
Best Practices for Distributed Machine Learning and Predictive Analytics Usin...
Amazon Web Services
 
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Amazon Web Services
 
Build a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million usersBuild a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million users
Amazon Web Services
 
Modernize and Move your Microsoft Applications on AWS
Modernize and Move your Microsoft Applications on AWSModernize and Move your Microsoft Applications on AWS
Modernize and Move your Microsoft Applications on AWS
Amazon Web Services
 
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdfAMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
Amazon Web Services
 
CON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWSCON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWS
Amazon Web Services
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
Amazon Web Services
 
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
Amazon Web Services
 
Optimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWSOptimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWS
Amazon Web Services
 
MCL302_Maximizing the Customer Experience with AI on AWS
MCL302_Maximizing the Customer Experience with AI on AWSMCL302_Maximizing the Customer Experience with AI on AWS
MCL302_Maximizing the Customer Experience with AI on AWS
Amazon Web Services
 
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
Amazon Web Services
 
GPSWKS401_Designing a Cloud Enterprise Data Warehouse
GPSWKS401_Designing a Cloud Enterprise Data WarehouseGPSWKS401_Designing a Cloud Enterprise Data Warehouse
GPSWKS401_Designing a Cloud Enterprise Data Warehouse
Amazon Web Services
 

What's hot (20)

MCL303-Deep Learning with Apache MXNet and Gluon
MCL303-Deep Learning with Apache MXNet and GluonMCL303-Deep Learning with Apache MXNet and Gluon
MCL303-Deep Learning with Apache MXNet and Gluon
 
MAE401_Designing for DisneyMarvel Studio-Grade Security
MAE401_Designing for DisneyMarvel Studio-Grade SecurityMAE401_Designing for DisneyMarvel Studio-Grade Security
MAE401_Designing for DisneyMarvel Studio-Grade Security
 
MAE304-Turners Cloud Archive for CNN's Video Library and Global Multiplatform...
MAE304-Turners Cloud Archive for CNN's Video Library and Global Multiplatform...MAE304-Turners Cloud Archive for CNN's Video Library and Global Multiplatform...
MAE304-Turners Cloud Archive for CNN's Video Library and Global Multiplatform...
 
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
 
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdfWPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
WPS301-Navigating HIPAA and HITRUST_QuickStart Guide to Account Gov Strat.pdf
 
DVC304_Compliance and Top Security Threats in the Cloud—Are You Protected
DVC304_Compliance and Top Security Threats in the Cloud—Are You ProtectedDVC304_Compliance and Top Security Threats in the Cloud—Are You Protected
DVC304_Compliance and Top Security Threats in the Cloud—Are You Protected
 
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
 
Best Practices for Distributed Machine Learning and Predictive Analytics Usin...
Best Practices for Distributed Machine Learning and Predictive Analytics Usin...Best Practices for Distributed Machine Learning and Predictive Analytics Usin...
Best Practices for Distributed Machine Learning and Predictive Analytics Usin...
 
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
 
Build a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million usersBuild a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million users
 
Modernize and Move your Microsoft Applications on AWS
Modernize and Move your Microsoft Applications on AWSModernize and Move your Microsoft Applications on AWS
Modernize and Move your Microsoft Applications on AWS
 
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdfAMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
 
CON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWSCON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWS
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
 
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
 
Optimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWSOptimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWS
 
MCL302_Maximizing the Customer Experience with AI on AWS
MCL302_Maximizing the Customer Experience with AI on AWSMCL302_Maximizing the Customer Experience with AI on AWS
MCL302_Maximizing the Customer Experience with AI on AWS
 
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
 
GPSWKS401_Designing a Cloud Enterprise Data Warehouse
GPSWKS401_Designing a Cloud Enterprise Data WarehouseGPSWKS401_Designing a Cloud Enterprise Data Warehouse
GPSWKS401_Designing a Cloud Enterprise Data Warehouse
 

Similar to CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on Amazon ECS

CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot FleetCMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
Amazon Web Services
 
Design, Build, and Modernize Your Web Applications with AWS
 Design, Build, and Modernize Your Web Applications with AWS Design, Build, and Modernize Your Web Applications with AWS
Design, Build, and Modernize Your Web Applications with AWS
Donnie Prakoso
 
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Amazon Web Services
 
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Amazon Web Services
 
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost EfficiencyARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
Amazon Web Services
 
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost EfficiencyARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
Amazon Web Services
 
AWS User Group Wellington - re:Invent 2017 Recap
AWS User Group Wellington - re:Invent 2017 RecapAWS User Group Wellington - re:Invent 2017 Recap
AWS User Group Wellington - re:Invent 2017 Recap
API Talent
 
Workshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECSWorkshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECS
Amazon Web Services
 
透過Spot instances, Containers & Serverless降低成本
透過Spot instances, Containers & Serverless降低成本透過Spot instances, Containers & Serverless降低成本
透過Spot instances, Containers & Serverless降低成本
Amazon Web Services
 
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Amazon Web Services
 
Scaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million UsersScaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million Users
Amazon Web Services
 
AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017
Amazon Web Services
 
AWS 容器服務入門實務
AWS 容器服務入門實務AWS 容器服務入門實務
AWS 容器服務入門實務
Amazon Web Services
 
Building Web Apps on AWS
Building Web Apps on AWSBuilding Web Apps on AWS
Building Web Apps on AWS
Amazon Web Services
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWS
Amazon Web Services
 
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Amazon Web Services
 
Introducing Amazon Fargate
Introducing Amazon FargateIntroducing Amazon Fargate
Introducing Amazon Fargate
Amazon Web Services
 
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Amazon Web Services
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
Amazon Web Services
 
AWS Cost Optimisation Solutions
AWS Cost Optimisation SolutionsAWS Cost Optimisation Solutions
AWS Cost Optimisation Solutions
Amazon Web Services
 

Similar to CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on Amazon ECS (20)

CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot FleetCMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
 
Design, Build, and Modernize Your Web Applications with AWS
 Design, Build, and Modernize Your Web Applications with AWS Design, Build, and Modernize Your Web Applications with AWS
Design, Build, and Modernize Your Web Applications with AWS
 
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
 
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
 
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost EfficiencyARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
 
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost EfficiencyARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
 
AWS User Group Wellington - re:Invent 2017 Recap
AWS User Group Wellington - re:Invent 2017 RecapAWS User Group Wellington - re:Invent 2017 Recap
AWS User Group Wellington - re:Invent 2017 Recap
 
Workshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECSWorkshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECS
 
透過Spot instances, Containers & Serverless降低成本
透過Spot instances, Containers & Serverless降低成本透過Spot instances, Containers & Serverless降低成本
透過Spot instances, Containers & Serverless降低成本
 
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
 
Scaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million UsersScaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million Users
 
AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017
 
AWS 容器服務入門實務
AWS 容器服務入門實務AWS 容器服務入門實務
AWS 容器服務入門實務
 
Building Web Apps on AWS
Building Web Apps on AWSBuilding Web Apps on AWS
Building Web Apps on AWS
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWS
 
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
 
Introducing Amazon Fargate
Introducing Amazon FargateIntroducing Amazon Fargate
Introducing Amazon Fargate
 
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
AWS Cost Optimisation Solutions
AWS Cost Optimisation SolutionsAWS Cost Optimisation Solutions
AWS Cost Optimisation Solutions
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
Amazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
Amazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
Amazon Web Services
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Amazon Web Services
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
Amazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
Amazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Amazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
Amazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Amazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on Amazon ECS

  • 1. AWS re:INVENT Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on Amazon ECS H u b e r t C h e u n g , A W S S o l u t i o n s A r c h i t e c t A n d y M u i , A W S S o l u t i o n s A r c h i t e c t D a v i d K u o , A W S S o l u t i o n s A r c h i t e c t N o v e m b e r 2 7 , 2 0 1 7
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. BEFORE WE GET STARTED • Is everyone connected to Wi-Fi? Power? • You will be using your own AWS account in this workshop • Does everyone have the credits? • If your AWS account is < 24 hours old, or if you have never launched an Amazon Elastic Compute Cloud (Amazon EC2) instance in your account, please raise your hand and provide your AWS account number to one of us • Please complete the evaluation in the app
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WHAT TO EXPECT • Hands-on, self-paced workshop • Introduction to MXNet and containers • Overview of Amazon EC2 Container Service (Amazon ECS) and Amazon EC2 Container Registry (Amazon ECR) • Overview of Amazon EC2 Spot Instances • Why use Amazon ECS and Amazon EC2 Spot Instances together • Most importantly—work together and have some fun!
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MXNET AND CONTAINERS
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MXNet • Open-source deep learning framework— https://github.com/dmlc/mxnet • Define, train, and deploy deep neural networks • Highly scalable—single/multiple hosts, CPU/GPU support • Support for multiple languages
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WHY CONTAINERS?
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CONTAINERS INCREASE AGILITY Portability Same immutable images; run anywhere Flexibility Create modular environments; decompose apps Speed Speeds up build and release cycle Efficiency Optimize resource utilization Agility
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AMAZON EC2 CONTAINER SERVICE (AMAZON ECS)
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AMAZON ECS BENEFITS Easily Manage Clusters for Any Scale Flexible Container Placement Designed for Use with Other AWS Services Extensible Performance at Scale Secure
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ARCHITECTURE Container Instance Cluster Agent Task Agent Task Container Task Container Run Task Schedule Task Task Definition Task + Service Definition
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AMAZON ECR USAGE Amazon ECR Task Definition ECS aws_account_id.dkr.ecr.us-west- 2.amazonaws.com/image_name:latest Image url Image url
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLOUDFORMATION
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. BENEFITS Templated resource provisioning Infrastructure as code Declarative and flexible Easy to use
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WORKFLOW Template AWS CloudFormation Stack JSON or YAML formatted file Parameter definition Resource creation Configuration actions Configured AWS resources Comprehensive service support Service event aware Customizable Framework Stack creation Stack updates Error detection and rollback
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AMAZON EC2 SPOT INSTANCES
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AMAZON EC2 CONSUMPTION MODELS 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
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WHAT ARE SPOT INSTANCES? Amazon EC2 Spot Instances are spare Amazon EC2 On-Demand capacity with very simple rules…
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SPOT RULES ARE SIMPLE Markets where the price of compute changes based on supply and demand You’ll never pay more than your bid; when the market exceeds your bid you get 2 minutes to wrap up your work
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SHOW ME THE MARKETS! $0.27 $0.29$0.50 1b 1c1a 8XL $0.30 $0.16$0.214XL $0.07 $0.08$0.082XL $0.05 $0.04$0.04XL $0.01 $0.04$0.01L C4 $1.76 On Demand $0.88 $0.44 $.22 $0.11 Each instance family Each instance size Each Availability Zone In every Region Is a separate Spot Market
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. BID PRICE AS OPPOSED TO MARKET PRICE 50% Bid 75% Bid You pay the market price 25% Bid
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WHY AMAZON ECS AND SPOT INSTANCES?
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1. BEST VALUE FOR AMAZON EC2 CAPACITY • Since Spot Instances typically cost 50-90% less than on- demand, you can increase your compute capacity by 2-10x within the same budget • Or you could save 50-90% on your existing workload • Either way, you should try it!
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2. DIVERSIFICATION WITH SPOT FLEET • Containers are a natural fit for a diverse allocation of resources—ECS just sees a pool of resources • Spot Fleet thrives on diversification—across instance types, instance sizes, and Availability Zones
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3. LOWEST PRICE WITH SPOT FLEET • The ECS runtask scheduler randomly distributes tasks across your cluster (typically used for batch jobs) • Spot Fleet has a built-in allocation strategy of lowest price • Also don’t forget about Spot Blocks (run Spot Instances without interruption for 1 to 6 hours)
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WORKSHOP: IMAGE CLASSIFICATION
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. OVERALL ARCHITECTURE Amazon S3 AWS CLI Public subnet – AZ #1 Public subnet – AZ #2 Amazon ECS Spot Instance Spot Instance Spot Fleet >_ SSH Amazon ECR AWS Management Console RunTask
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 1: SET UP ENVIRONMENT Amazon S3 Public subnet – AZ #1 Public subnet – AZ #2 Amazon ECS Spot Instance Spot Instance Spot Fleet Amazon ECR AWS CloudFormation
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 2: BUILD AN MXNET DOCKER IMAGE Amazon ECR Subnet Amazon ECS Spot Instance Task Definition Image url
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 3: DEPLOY MXNET TO AMAZON ECS Amazon S3 Public subnet – AZ #1 Public subnet – AZ #2 Amazon ECS Spot Instance Spot Instance Spot Fleet Amazon ECR AWS Management Console
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 4: IMAGE CLASSFICATION DEMO
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LAB 5: IMAGE CLASSIFICATION IN TASK Amazon S3 Public subnet – AZ #1 Public subnet – AZ #2 Amazon ECS Spot Instance Spot Instance Spot Fleet Amazon ECR AWS Management Console RunTask
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SOME POINTERS… • Apply your AWS Credits. • https://aws.amazon.com/awscredits/ • This is a self-paced lab. Don’t stress to finish here. You can access the content from GitHub anytime. • The value-add of doing the workshop here is being together. Don’t be shy. Ask questions. • Work together. Collaborate. Most importantly, have fun!
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LET’S GET STARTED! https://github.com/awslabs/ecs-deep- learning-workshop Follow the lab guide! Raise your hand if you have questions.
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. APPENDIX
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. APPLY YOUR CREDITS https://aws.amazon.com/awscredits/
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WORKSHOP CLEANUP 1. Delete the CloudFormation stack 2. Check what resources CloudFormation was not able to delete (it won’t delete things it did not create or that were modified) 1. Amazon S3 bucket 2. Amazon ECR repository 3. Delete the CloudFormation stack again
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. EVALUATIONS Please don’t forget to complete the workshop evaluation in the app!
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RELATED SESSIONS • CON202 - Getting Started with Docker and Amazon ECS • MCL303 - Deep Learning with Apache MXNet and Gluon • MCL310 - Building Deep Learning Applications with Apache MXNet and Gluon
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!