SlideShare a Scribd company logo
1 of 34
WIFI: awsDevDay | PASS: CodeHappy
U P N E X T :
Introduction to Batch
Processing on AWS
T H A N K S T O O U R F R I E N D S A T :
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Pierre Steckmeyer, Solutions Architect
August 1, 2017
Introduction to Batch
Processing on AWS
• Batch processing – overview and challenges
• Why run batch workloads in the cloud
• Overview of AWS batch solutions
• Deep dive look at AWS Batch and Amazon ECS
• Best practices review
Agenda
Challenges of Running Batch Workloads
• Typically resource intensive
• Time constraint for completion
• Potential impact to concurrent batch jobs
• Scaling infrastructure resources
• Ensuring effective resource utilization and cost savings
• Fragile and unreliable
What Batch Workloads Need
Reliability Easy Development Easy Deployment
High Efficiency Low Ops Load Cost Effective
Why the cloud makes sense for batch workloads
Reliable Scalable Pay as you goInfrastructure as
code
Why containers make sense for batch workloads
• Simple to model
• Polyglot
• Image is the version
• Do one thing well
• You build it, you run it
• Black box
Options for batch workloads on AWS
AWS Batch Amazon ECS
Introducing AWS Batch
• Fully managed batch primitives
• Focus on your applications (shell scripts,
Linux executables, Docker images) and
their resource requirements
• We take care of the rest!
IAM role for the
AWS Batch job
Input files
Queue of
runnable jobs
S3 events trigger a
Lambda function that submits
an AWS Batch job
AWS Batch
compute environments
AWS Batch
job output
Typical AWS Batch Job Architecture
Job definition
Job resource requirements
and other parameters
AWS Batch execution
Application
image
AWS Batch
Scheduler
Running batch workloads with
Amazon ECS
File put into
S3 bucket
Amazon
Simple Queue
Service
Output to S3
bucket
Amazon ECS provisions compute
clusters and schedules tasks based
on demand
Batch worker
task polls
SQS for new
jobs
Queue load is
communicated to
ECS
Containerized
batch worker
processes file
Basic batch workflow with ECS
Trigger Batch Processing with Lambda
Amazon ECS
Availability Zone Availability Zone
Container Instance
AutoScaling Group
Task A
AWS Lambda
Amazon
S3 Bucket
(Source)
ecs:RunTask
Amazon
S3 Bucket
(Target)
Amazon
S3 Bucket
Object
Amazon
CloudWatch
AWS CloudTrail
Container Instance
Fleet of workers with ECS with SQS
Amazon ECS
Availability Zone Availability Zone
SQS queue
Container Instance Container Instance
AutoScaling Group
Task A
AWS Lambda
Amazon
S3
DynamoDB
Amazon
Kinesis
ecs:RunTask
Amazon
CloudWatch
AWS CloudTrail
Long-running Batch Jobs
• Utilize Spot
Instances
• EC2 Spot Blocks for
Defined-Duration
Workloads
• ECS event stream
for CloudWatch
Events
• Service Scaling and
Monitoring
Amazon ECS
Availability Zone Availability Zone
Container Instance Container Instance
AutoScaling Group
Task A Task B
Task C
Amazon
CloudWatch
AWS CloudTrail
Get the Best Value for EC2 Capacity – Spot
Instances
• 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!
Best Practices
• Store state and inputs, outputs in S3 or another
datastore
• Minimize dependencies between task definitions (should
be independent of each other)
• Use Spot Instances and Spot fleets for long-running
batch jobs
• Monitor cluster state with ECS APIs
• Share pools of resources
• Auto Scaling, VPC, IAM, scheduled Reserved Instances
Serving
Maps at
Scale on
AWS
Powers over 5,000 apps in categories ranging from social to mobility
Reaches more than 200 million users each month and growing
C4 R3 M4R3 R3
R3 R3 R3
M4 M4
M4 M4 M4
C4 C4
C4 C4 C4
Map Service Search Service Directions Service
C4
ECS Cluster
R3 M4R3 R3
R3 R3 R3
M4 M4
M4 M4 M4
C4 C4
C4 C4 C4
Map Service Search ServiceDirections Service
Deploying
with the
Old Way
R3 R3 R3
R3 R3 R3
Git SHA 56fb514
R3 R3 R3
R3 R3 R3
Git SHA 168f73e
Deploying
on ECS
Deploys take minutes instead of hours
Can iterate and ship new features faster
Rollbacks are faster
Reduce
Waste with
Better
Instance
Packing
Map
service
CPU 55%
Mem 5%
Search
service
CPU 25%
Mem 75%
Combined
services
with ECS
CPU 80%
Mem 80%
Stability On
Spot with
Instance
Diversity
C4
ECS Cluster
R3 R3 R3
R3 R3 R3
M4
M4
M4 M4
M4 M4
C4 C4
C4 C4 C4
Map Service Search ServiceDirections Service
Spot Fleet
C4
C4
R3
R3
25%
Fewer instances
80-90%
Savings per month on EC2
21
Services
2000
Tasks
1.3 billion
Requests per day
Time and Event-Based Task Scheduling
• Schedule on fixed time intervals (e.g.: number of minutes, hours, or days)
• or use cron expressions.
• Set Amazon ECS as a CloudWatch Events target
Time and Event-Based Task Scheduling
• Schedule on fixed time intervals (e.g.: number of minutes, hours, or days)
• or use cron expressions.
• Set Amazon ECS as a CloudWatch Events target
Summary
• Cloud and containers are a great way to run batch
workloads
• Two options on AWS: Batch and ECS
• Why AWS Batch:
• Managed Batch Processing environment
• Why ECS:
• DIY Batch Processing
• Very flexible Time and Event based Task Scheduling
Thank You!
Don’t Forget Evaluations!

More Related Content

What's hot

Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017
Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017
Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017Amazon Web Services
 
Workshop: Serverless DevOps to the Rescue
Workshop: Serverless DevOps to the RescueWorkshop: Serverless DevOps to the Rescue
Workshop: Serverless DevOps to the RescueAmazon Web Services
 
Amazon Web Services EC2 Container Service (ECS)
Amazon Web Services EC2 Container Service (ECS)Amazon Web Services EC2 Container Service (ECS)
Amazon Web Services EC2 Container Service (ECS)Mayank Patel
 
Micrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECSMicrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECSAmazon Web Services
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSAmazon Web Services
 
Building and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesBuilding and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesAmazon Web Services
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSAmazon Web Services
 
Building and Scaling Your First Containerized Microservice
Building and Scaling Your First Containerized MicroserviceBuilding and Scaling Your First Containerized Microservice
Building and Scaling Your First Containerized MicroserviceAmazon Web Services
 
Getting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceGetting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceAmazon Web Services
 
Amazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep DiveAmazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep DiveAmazon Web Services
 
Introduction to Container Management on AWS
Introduction to Container Management  on AWSIntroduction to Container Management  on AWS
Introduction to Container Management on AWSAmazon Web Services
 
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...Amazon Web Services
 
Container Orchestration with Amazon ECS
Container Orchestration with Amazon ECSContainer Orchestration with Amazon ECS
Container Orchestration with Amazon ECSAmazon Web Services
 
Introduction to Batch Processing on AWS
Introduction to Batch Processing on AWSIntroduction to Batch Processing on AWS
Introduction to Batch Processing on AWSAmazon Web Services
 
Container Orchestration with Amazon ECS
Container Orchestration with Amazon ECSContainer Orchestration with Amazon ECS
Container Orchestration with Amazon ECSAmazon Web Services
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...Amazon Web Services
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWSAmazon Web Services
 
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)Amazon Web Services
 

What's hot (20)

Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017
Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017
Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017
 
ECS and ECR deep dive
ECS and ECR deep diveECS and ECR deep dive
ECS and ECR deep dive
 
Workshop: Serverless DevOps to the Rescue
Workshop: Serverless DevOps to the RescueWorkshop: Serverless DevOps to the Rescue
Workshop: Serverless DevOps to the Rescue
 
Amazon Web Services EC2 Container Service (ECS)
Amazon Web Services EC2 Container Service (ECS)Amazon Web Services EC2 Container Service (ECS)
Amazon Web Services EC2 Container Service (ECS)
 
Micrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECSMicrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECS
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
 
Building and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesBuilding and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized Microservices
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Building and Scaling Your First Containerized Microservice
Building and Scaling Your First Containerized MicroserviceBuilding and Scaling Your First Containerized Microservice
Building and Scaling Your First Containerized Microservice
 
Getting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceGetting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container Service
 
Amazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep DiveAmazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep Dive
 
Introduction to Container Management on AWS
Introduction to Container Management  on AWSIntroduction to Container Management  on AWS
Introduction to Container Management on AWS
 
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
 
Container Orchestration with Amazon ECS
Container Orchestration with Amazon ECSContainer Orchestration with Amazon ECS
Container Orchestration with Amazon ECS
 
Introduction to Batch Processing on AWS
Introduction to Batch Processing on AWSIntroduction to Batch Processing on AWS
Introduction to Batch Processing on AWS
 
Container Orchestration with Amazon ECS
Container Orchestration with Amazon ECSContainer Orchestration with Amazon ECS
Container Orchestration with Amazon ECS
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
 
Intro to Amazon ECS
Intro to Amazon ECSIntro to Amazon ECS
Intro to Amazon ECS
 

Similar to Intro to Batch Processing on AWS - DevDay Austin 2017

Intro to batch processing on AWS
Intro to batch processing on AWSIntro to batch processing on AWS
Intro to batch processing on AWSAmazon Web Services
 
Introduction to Batch Processing on AWS
Introduction to Batch Processing on AWSIntroduction to Batch Processing on AWS
Introduction to Batch Processing on AWSAmazon Web Services
 
Batch Processing with Containers on AWS - June 2017 AWS Online Tech Talks
Batch Processing with Containers on AWS -  June 2017 AWS Online Tech TalksBatch Processing with Containers on AWS -  June 2017 AWS Online Tech Talks
Batch Processing with Containers on AWS - June 2017 AWS Online Tech TalksAmazon Web Services
 
Deep Dive on Microservices and Docker
Deep Dive on Microservices and DockerDeep Dive on Microservices and Docker
Deep Dive on Microservices and DockerKristana Kane
 
The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017Amazon Web Services
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingAmazon Web Services
 
What is Amazon Web Services & How to Start to deploy your apps ?
What is Amazon Web Services & How to Start to deploy your apps ?What is Amazon Web Services & How to Start to deploy your apps ?
What is Amazon Web Services & How to Start to deploy your apps ?Sébastien ☁ Stormacq
 
AWS re:Invent 2016: State of the Union: Containers (CON316)
AWS re:Invent 2016: State of the Union:  Containers (CON316)AWS re:Invent 2016: State of the Union:  Containers (CON316)
AWS re:Invent 2016: State of the Union: Containers (CON316)Amazon Web Services
 
gkkAwscloudpractitioneressentialstraining
gkkAwscloudpractitioneressentialstraininggkkAwscloudpractitioneressentialstraining
gkkAwscloudpractitioneressentialstrainingAnne Starr
 
SRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and DockerSRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and DockerAmazon Web Services
 
Born in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a StartupBorn in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a StartupAmazon Web Services
 
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)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 2017Amazon Web Services
 
Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Amazon Web Services
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)AWS Vietnam Community
 
Cloud First: New Architecture for New Infrastructure
Cloud First: New Architecture for New InfrastructureCloud First: New Architecture for New Infrastructure
Cloud First: New Architecture for New InfrastructureAmazon Web Services
 
Day 1 - Introduction to Cloud Computing with Amazon Web Services
Day 1 - Introduction to Cloud Computing with Amazon Web ServicesDay 1 - Introduction to Cloud Computing with Amazon Web Services
Day 1 - Introduction to Cloud Computing with Amazon Web ServicesAmazon Web Services
 

Similar to Intro to Batch Processing on AWS - DevDay Austin 2017 (20)

Intro to batch processing on AWS
Intro to batch processing on AWSIntro to batch processing on AWS
Intro to batch processing on AWS
 
Introduction to Batch Processing on AWS
Introduction to Batch Processing on AWSIntroduction to Batch Processing on AWS
Introduction to Batch Processing on AWS
 
Batch Processing with Containers on AWS - June 2017 AWS Online Tech Talks
Batch Processing with Containers on AWS -  June 2017 AWS Online Tech TalksBatch Processing with Containers on AWS -  June 2017 AWS Online Tech Talks
Batch Processing with Containers on AWS - June 2017 AWS Online Tech Talks
 
Deep Dive on Microservices and Docker
Deep Dive on Microservices and DockerDeep Dive on Microservices and Docker
Deep Dive on Microservices and Docker
 
The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017
 
Best of re:Invent
Best of re:InventBest of re:Invent
Best of re:Invent
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
 
The Best of re:invent 2016
The Best of re:invent 2016The Best of re:invent 2016
The Best of re:invent 2016
 
What is Amazon Web Services & How to Start to deploy your apps ?
What is Amazon Web Services & How to Start to deploy your apps ?What is Amazon Web Services & How to Start to deploy your apps ?
What is Amazon Web Services & How to Start to deploy your apps ?
 
AWS re:Invent 2016: State of the Union: Containers (CON316)
AWS re:Invent 2016: State of the Union:  Containers (CON316)AWS re:Invent 2016: State of the Union:  Containers (CON316)
AWS re:Invent 2016: State of the Union: Containers (CON316)
 
gkkAwscloudpractitioneressentialstraining
gkkAwscloudpractitioneressentialstraininggkkAwscloudpractitioneressentialstraining
gkkAwscloudpractitioneressentialstraining
 
SRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and DockerSRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and Docker
 
Born in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a StartupBorn in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a Startup
 
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
 
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
 
Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS
 
Serverless Culture
Serverless CultureServerless Culture
Serverless Culture
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
 
Cloud First: New Architecture for New Infrastructure
Cloud First: New Architecture for New InfrastructureCloud First: New Architecture for New Infrastructure
Cloud First: New Architecture for New Infrastructure
 
Day 1 - Introduction to Cloud Computing with Amazon Web Services
Day 1 - Introduction to Cloud Computing with Amazon Web ServicesDay 1 - Introduction to Cloud Computing with Amazon Web Services
Day 1 - Introduction to Cloud Computing with Amazon Web Services
 

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 FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon 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
 
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 WorkloadsAmazon 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 sfatareAmazon 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 NodeJSAmazon 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 webAmazon 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 sfatareAmazon 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 ServiceAmazon 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
 

Intro to Batch Processing on AWS - DevDay Austin 2017

  • 1.
  • 2. WIFI: awsDevDay | PASS: CodeHappy U P N E X T : Introduction to Batch Processing on AWS
  • 3. T H A N K S T O O U R F R I E N D S A T :
  • 4. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Pierre Steckmeyer, Solutions Architect August 1, 2017 Introduction to Batch Processing on AWS
  • 5. • Batch processing – overview and challenges • Why run batch workloads in the cloud • Overview of AWS batch solutions • Deep dive look at AWS Batch and Amazon ECS • Best practices review Agenda
  • 6. Challenges of Running Batch Workloads • Typically resource intensive • Time constraint for completion • Potential impact to concurrent batch jobs • Scaling infrastructure resources • Ensuring effective resource utilization and cost savings • Fragile and unreliable
  • 7. What Batch Workloads Need Reliability Easy Development Easy Deployment High Efficiency Low Ops Load Cost Effective
  • 8. Why the cloud makes sense for batch workloads Reliable Scalable Pay as you goInfrastructure as code
  • 9. Why containers make sense for batch workloads • Simple to model • Polyglot • Image is the version • Do one thing well • You build it, you run it • Black box
  • 10. Options for batch workloads on AWS AWS Batch Amazon ECS
  • 11. Introducing AWS Batch • Fully managed batch primitives • Focus on your applications (shell scripts, Linux executables, Docker images) and their resource requirements • We take care of the rest!
  • 12. IAM role for the AWS Batch job Input files Queue of runnable jobs S3 events trigger a Lambda function that submits an AWS Batch job AWS Batch compute environments AWS Batch job output Typical AWS Batch Job Architecture Job definition Job resource requirements and other parameters AWS Batch execution Application image AWS Batch Scheduler
  • 13. Running batch workloads with Amazon ECS
  • 14. File put into S3 bucket Amazon Simple Queue Service Output to S3 bucket Amazon ECS provisions compute clusters and schedules tasks based on demand Batch worker task polls SQS for new jobs Queue load is communicated to ECS Containerized batch worker processes file Basic batch workflow with ECS
  • 15. Trigger Batch Processing with Lambda Amazon ECS Availability Zone Availability Zone Container Instance AutoScaling Group Task A AWS Lambda Amazon S3 Bucket (Source) ecs:RunTask Amazon S3 Bucket (Target) Amazon S3 Bucket Object Amazon CloudWatch AWS CloudTrail Container Instance
  • 16. Fleet of workers with ECS with SQS Amazon ECS Availability Zone Availability Zone SQS queue Container Instance Container Instance AutoScaling Group Task A AWS Lambda Amazon S3 DynamoDB Amazon Kinesis ecs:RunTask Amazon CloudWatch AWS CloudTrail
  • 17. Long-running Batch Jobs • Utilize Spot Instances • EC2 Spot Blocks for Defined-Duration Workloads • ECS event stream for CloudWatch Events • Service Scaling and Monitoring Amazon ECS Availability Zone Availability Zone Container Instance Container Instance AutoScaling Group Task A Task B Task C Amazon CloudWatch AWS CloudTrail
  • 18. Get the Best Value for EC2 Capacity – Spot Instances • 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!
  • 19. Best Practices • Store state and inputs, outputs in S3 or another datastore • Minimize dependencies between task definitions (should be independent of each other) • Use Spot Instances and Spot fleets for long-running batch jobs • Monitor cluster state with ECS APIs • Share pools of resources • Auto Scaling, VPC, IAM, scheduled Reserved Instances
  • 20.
  • 21. Serving Maps at Scale on AWS Powers over 5,000 apps in categories ranging from social to mobility Reaches more than 200 million users each month and growing
  • 22. C4 R3 M4R3 R3 R3 R3 R3 M4 M4 M4 M4 M4 C4 C4 C4 C4 C4 Map Service Search Service Directions Service
  • 23. C4 ECS Cluster R3 M4R3 R3 R3 R3 R3 M4 M4 M4 M4 M4 C4 C4 C4 C4 C4 Map Service Search ServiceDirections Service
  • 24. Deploying with the Old Way R3 R3 R3 R3 R3 R3 Git SHA 56fb514 R3 R3 R3 R3 R3 R3 Git SHA 168f73e
  • 25. Deploying on ECS Deploys take minutes instead of hours Can iterate and ship new features faster Rollbacks are faster
  • 26. Reduce Waste with Better Instance Packing Map service CPU 55% Mem 5% Search service CPU 25% Mem 75% Combined services with ECS CPU 80% Mem 80%
  • 27. Stability On Spot with Instance Diversity C4 ECS Cluster R3 R3 R3 R3 R3 R3 M4 M4 M4 M4 M4 M4 C4 C4 C4 C4 C4 Map Service Search ServiceDirections Service Spot Fleet C4 C4 R3 R3
  • 30. Time and Event-Based Task Scheduling • Schedule on fixed time intervals (e.g.: number of minutes, hours, or days) • or use cron expressions. • Set Amazon ECS as a CloudWatch Events target
  • 31. Time and Event-Based Task Scheduling • Schedule on fixed time intervals (e.g.: number of minutes, hours, or days) • or use cron expressions. • Set Amazon ECS as a CloudWatch Events target
  • 32. Summary • Cloud and containers are a great way to run batch workloads • Two options on AWS: Batch and ECS • Why AWS Batch: • Managed Batch Processing environment • Why ECS: • DIY Batch Processing • Very flexible Time and Event based Task Scheduling