SlideShare a Scribd company logo
1 of 47
Download to read offline
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS & AWS Fargate
John Segers | Zeist | October 11, 2018
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
• Container orchestration
• ECS & Fargate concepts
• Demo
• ECS & Fargate concepts – Deep Dive
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Running one container is easy
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
But there are still moving pieces
Server
Guest OS
Bins/Libs Bins/Libs
App2App1
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Managing many containers is hard
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Enter container orchestration tools
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What are container orchestration tools?
Orchestration tools help us deploy, manage, and scale
our containers, so we don’t need to do all the heavy
lifting ourselves.
What does the container landscape on
AWS look like?
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What does the landscape look like all together?
Amazon ECS Amazon EKS Fargate mode for
ECS
Fargate mode
for EKS
(roadmap)
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What are the services for?
MANAGEMENT
Deployment, Scheduling,
Scaling & Management
HOSTING
Where the containers run
Amazon EC2
IMAGE REGISTRY
Container Image Repository
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS
Easiest way to deploy and
manage containers
Integration with entire AWS platform
ALB, Auto Scaling, Batch, Elastic Beanstalk,
CloudFormation, CloudTrail, CloudWatch Events,
CloudWatch Logs, CloudWatch Metrics, ECR, EC2 Spot,
IAM, NLB, Parameter Store, and VPC
Scales to support clusters of any size
Service integrations (like ALB and NLB) are at
container level
1
2
3
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
““
GoPro Reduces Compute Footprint
by 70% Using Containers on AWS
GoPro needed a
more efficient way to run
microservices for its cloud-
based video service,
GoPro Plus.
GoPro replaced a third-party
process-management
solution with Docker
containers running on
Amazon ECS.
• Reduced Amazon EC2
footprint by 70%
• Simplified cluster management
• Adopted infrastructure as code
for consistent deployment
• Sped deployment of dev/test
infrastructure
SolutionChallenge Benefits
By taking advantage of Amazon ECS, we have the
power to understand, manipulate, and manage our
environment easily.
Zaven Boni, DevOps Engineering Lead, GoPro
Company: GoPro
Industry: Consumer Goods
Country: United States
Website: www.gopro.com
About GoPro
GoPro builds cameras,
software, and accessories that
help people around the world
share their experiences in
immersive and exciting ways.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS concepts
EC2 INSTANCES
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container AGENT COMMUNICATION
SERVICE
Amazon
ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
Internet LOAD
BALANCER
LOAD
BALANCER
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cluster of hosts on EC2
EC2 INSTANCES
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container AGENT COMMUNICATION
SERVICE
Amazon
ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
Internet LOAD
BALANCER
LOAD
BALANCER
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS agent runs on hosts
EC2 INSTANCES
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container AGENT COMMUNICATION
SERVICE
Amazon
ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
Internet LOAD
BALANCER
LOAD
BALANCER
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS API to launch containers on clusters
EC2 INSTANCES
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container AGENT COMMUNICATION
SERVICE
Amazon
ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
Internet LOAD
BALANCER
LOAD
BALANCER
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS API to launch containers on clusters
EC2 INSTANCES
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container AGENT COMMUNICATION
SERVICE
Amazon
ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
Internet LOAD
BALANCER
LOAD
BALANCER
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Traffic is sent to your hosts
EC2 INSTANCES
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container AGENT COMMUNICATION
SERVICE
Amazon
ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
Internet LOAD
BALANCER
LOAD
BALANCER
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS
Agent
Docker
Agent
OS
EC2 Instance
ECS
Agent
Docker
Agent
OS
EC2 Instance
ECS
Agent
Docker
Agent
OS
EC2 Instance
Elastic
Container
Service
Where does Fargate come in then?
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Elastic
Container
Service
Where does Fargate come in then?
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS Fargate mode
Launch quickly
Scale easily
No infrastructure
Resource based pricing
Containers on demand
Manage everything at
container level
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
How do I know when to use Fargate vs EC2 mode?
Depends on your workload.
Fargate: if you can configure with just a Task Definition, and you’re
ok with awsvpc networking mode, try Fargate. Some caveats: can’t
exec into the container, or access the underlying host (this is also a
good thing)
EC2 mode: good if you need to customize!
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Demo time!
Application Load Balancer
Chat service
Redis service
Namespace
Service
Redis master CNAME
x.x.x.x:6379
Service registry
(See https://gitlab.com/ric_harvey/bl_practical_fargate)
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Task definition
{
"family": “scorekeep",
"containerDefinitions": [
{
"name":“scorekeep-frontend",
"image":"xxx.dkr.ecr.us-east-1.amazonaws.com/fe"
},
{
"name":“scorekeep-api",
"image":"xxx.dkr.ecr.us-east-1.amazonaws.com/api"
}
]
}
Immutable, versioned document
Identified by family:version
Contains a list of up to 10 container definitions
All containers are co-located on the same host
Each container definition has:
• A name
• Image URL (ECR or Public Images)
• And more…
Task Definition Snippet
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
{
"family": "scorekeep",
"cpu": "1 vCpu",
"memory": "2 gb",
"containerDefinitions": [
{
"name":“scorekeep-frontend",
"image":"xxx.dkr.ecr.us-east-1.amazonaws.com/fe“,
"cpu": 256,
"memoryReservation": 512
},
{
"name":“scorekeep-api",
"image":"xxx.dkr.ecr.us-east-1.amazonaws.com/api",
"cpu": 768,
"memoryReservation": 512
}
]
}
Units
• CPU : cpu-units. 1 vCPU = 1024 cpu-units
• Memory : MB
Task Level Resources:
• Total Cpu/Memory across all containers
• Required fields for Fargate
• Billing axis for Fargate
Container Level Resources:
• Defines sharing of task resources among containers
• Optional fields
Task
Level
Resources
Container
Level
Resources
Task Definition Snippet
CPU and memory specification
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS container networking
none
Tasks do not have external connectivity.
host
Container ports mapped directly to host ENI, bypassing Docker virtual network.
bridge
Default Docker mode, Tasks use Docker built-in virtual network inside containers.
awsvpc
ENI allocated per Task. Public IP address optional with Fargate; private only for EC2.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Need some more info on working with awsvpc?
https://aws.amazon.com/blogs/compute/task-
networking-in-aws-fargate/
https://aws.amazon.com/blogs/compute/introd
ucing-cloud-native-networking-for-ecs-
containers/
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Service discovery
Load Balancers Key-value store Service Mesh
Service
registry
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Managed service discovery for ECS
You build apps where
services are invoked by
name & name resolves
to IP/port dynamically
You turn on service
discovery during
deployment —
service creation
DEV OPS
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS updates Service Registry based
on naming convention, task registrations,
de-registrations and health
Route 53 provides Service Registry
Route 53ECS
ECS service discovery powered by Route 53
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Route 53 provides APIs to create
• Namespace
• CNAME per service autoname
• A records per task IP
• SRV records per task IP + portService
CNAME: A / SRV record
Namespace
Route 53 provides Service Registry
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cluster: myapp
AZ 1 AZ 2
app
10.0.6.5:8080
web
10.0.8.6:8080
app
10.0.4.5:8080
web
10.0.3.6:8080
Namespace: myapp.local
Service
web.myapp.local CNAME
10.0.4.5:8080
10.0.3.6:8080
Service
app.myapp.local CNAME
10.0.6.5:8080
10.0.8.6:8080
ECS updates service endpoints in Route 53
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Data volumes in ECS tasks
Bind mounts
Supported with EC2 and Fargate modes
Fargate-managed volume: 4 GB per task
No persistent volumes with Fargate
Docker volumes
Supported in EC2 mode
Built-in local & third-party volume drivers
supported
{
”volumes”: [
{
”name”: “database_scratch”
}
],
"containerDefinitions": [
{
"image": "my-repo/database",
"mountPoints": [
{
"containerPath": "/var/scratch",
"sourceVolume": "database_scratch"
}
],
"name": "database1”
},
{
"image": "my-repo/database",
"mountPoints": [
{
"containerPath": "/var/scratch",
"sourceVolume": "database_scratch”
}
],
"name": "database2”
}
],
...
}
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Task placement
Cluster Constraints
Custom Constraints
Placement Strategies
Apply Filter
Satisfy CPU, memory, and port requirements
Filter for location, instance-type, AMI, or custom
attribute constraints
Identify instances that meet spread or binpack
placement strategy
Select final container instances for placement
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge t2.small
us-east-1aus-east-1d
g2.2xlarge t2.medium
t2.micro t2.small
us-east-1c
Placement: Spread across Zone and Binpack
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge t2.small
us-east-1aus-east-1d
g2.2xlarge t2.medium
t2.micro t2.small
us-east-1c
Placement: Spread across Zone and Binpack
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS EC2 mode vs Fargate
• Change in networking mode: "awsvpc” only for Fargate
• Specify container port, no host port:
"portMappings":
[{"containerPort": ”8081"}]
• Only ALB or NLB. ALB needs to use target type IP, not instance.
• Launch Type: Fargate
• Data volumes
• Fargate data volumes fixed in size, no Docker volumes
• No hosts to manage with Fargate
• Use EC2 mode if you need host access
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
“We moved to AWS Fargate because we need
the ability to scale quickly up from baseline,
run multi-container workloads, and get fine-
grained network control, without having to
manage our own infrastructure.”
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
https://medium.com/containers-on-
aws/choosing-your-container-environment-
on-aws-with-ecs-eks-and-fargate-
cfbe416ab1a
Need more info on how to choose?
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Need help migrating between Fargate and EC2?
https://aws.amazon.com/blogs/compute/migr
ating-your-amazon-ecs-containers-to-aws-
fargate/
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bonus: where can I learn more?
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
CLIs for Fargate/ECS:
aws-cli: the official OG. Open source, includes most AWS services.
• More info here: https://aws.amazon.com/cli/
• Github here: https://github.com/aws/aws-cli
ecs-cli: also official, but just for ECS. Supports docker compose files.
• More info here: https://github.com/aws/amazon-ecs-cli
Some good unofficial options:
Fargate cli: https://github.com/jpignata/fargate
Coldbrew cli: https://github.com/coldbrewcloud/coldbrew-cli
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
The awesome-ecs project:
https://github.com/nathanpeck/awesome-ecs
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Workshops!
From @brentcontained
https://t.co/ba0usbZqHN
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
ECS two ways
From @arungupta
https://github.com/arun-gupta/ecs-workshop
From @abbyfuller
https://github.com/abby-fuller/ecs-demo
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
John Segers | jsegers@amazon.com | @jplsegers

More Related Content

What's hot

Continuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar SeriesContinuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar SeriesAmazon Web Services
 
Architecting-for-the-cloud-Best-Practices
Architecting-for-the-cloud-Best-PracticesArchitecting-for-the-cloud-Best-Practices
Architecting-for-the-cloud-Best-PracticesAmazon Web Services
 
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatchAmazon Web Services
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech TalkAmazon Web Services
 
Introducing AWS Elastic Beanstalk
Introducing AWS Elastic BeanstalkIntroducing AWS Elastic Beanstalk
Introducing AWS Elastic BeanstalkAmazon Web Services
 
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...Amazon Web Services
 
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...Amazon Web Services
 
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...Amazon Web Services
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateAmazon Web Services
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSAmazon Web Services
 
AWS Global Infrastructure Foundations
AWS Global Infrastructure Foundations AWS Global Infrastructure Foundations
AWS Global Infrastructure Foundations Amazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
다양한 배포 기법과 AWS에서 구축하는 CI/CD 파이프라인 l 안효빈 솔루션즈 아키텍트
다양한 배포 기법과 AWS에서 구축하는 CI/CD 파이프라인 l 안효빈 솔루션즈 아키텍트다양한 배포 기법과 AWS에서 구축하는 CI/CD 파이프라인 l 안효빈 솔루션즈 아키텍트
다양한 배포 기법과 AWS에서 구축하는 CI/CD 파이프라인 l 안효빈 솔루션즈 아키텍트Amazon Web Services Korea
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018Amazon Web Services
 
Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)Amazon Web Services
 

What's hot (20)

Continuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar SeriesContinuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
Continuous Delivery with AWS Lambda - AWS April 2016 Webinar Series
 
Getting Started on AWS
Getting Started on AWSGetting Started on AWS
Getting Started on AWS
 
Architecting-for-the-cloud-Best-Practices
Architecting-for-the-cloud-Best-PracticesArchitecting-for-the-cloud-Best-Practices
Architecting-for-the-cloud-Best-Practices
 
AWS 101
AWS 101AWS 101
AWS 101
 
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
 
Introducing AWS Elastic Beanstalk
Introducing AWS Elastic BeanstalkIntroducing AWS Elastic Beanstalk
Introducing AWS Elastic Beanstalk
 
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
 
AWS ELB
AWS ELBAWS ELB
AWS ELB
 
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
 
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & Fargate
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
 
AWS Systems Manager
AWS Systems ManagerAWS Systems Manager
AWS Systems Manager
 
AWS Global Infrastructure Foundations
AWS Global Infrastructure Foundations AWS Global Infrastructure Foundations
AWS Global Infrastructure Foundations
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
다양한 배포 기법과 AWS에서 구축하는 CI/CD 파이프라인 l 안효빈 솔루션즈 아키텍트
다양한 배포 기법과 AWS에서 구축하는 CI/CD 파이프라인 l 안효빈 솔루션즈 아키텍트다양한 배포 기법과 AWS에서 구축하는 CI/CD 파이프라인 l 안효빈 솔루션즈 아키텍트
다양한 배포 기법과 AWS에서 구축하는 CI/CD 파이프라인 l 안효빈 솔루션즈 아키텍트
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
 
Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)
 

Similar to Deep dive ECS & Fargate Deep Dive

[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...Amazon Web Services Korea
 
Getting Started with Containers on AWS
Getting Started with Containers on AWSGetting Started with Containers on AWS
Getting Started with Containers on AWSAmazon Web Services
 
Semplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWSSemplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWSAmazon Web Services
 
Getting-started-with-containers on AWS
Getting-started-with-containers on AWSGetting-started-with-containers on AWS
Getting-started-with-containers on AWSAmazon Web Services
 
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...Amazon Web Services
 
SRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS FargateSRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS FargateAmazon Web Services
 
AWS 微服務中的 Container 選項比較 (Level 400)
AWS 微服務中的 Container 選項比較   (Level 400)AWS 微服務中的 Container 選項比較   (Level 400)
AWS 微服務中的 Container 選項比較 (Level 400)Amazon Web Services
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Web Services
 
Modern Applications Web Day | Container Workloads on AWS
Modern Applications Web Day | Container Workloads on AWSModern Applications Web Day | Container Workloads on AWS
Modern Applications Web Day | Container Workloads on AWSAWS Germany
 
Orchestrating containers on AWS | AWS Floor28
Orchestrating containers on AWS | AWS Floor28Orchestrating containers on AWS | AWS Floor28
Orchestrating containers on AWS | AWS Floor28Amazon Web Services
 
Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018Amazon Web Services
 
使用 Amazon EKS 打造高效的服務架構設計
使用 Amazon EKS 打造高效的服務架構設計使用 Amazon EKS 打造高效的服務架構設計
使用 Amazon EKS 打造高效的服務架構設計Amazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018AWS Germany
 
Executando Kubernetes com Amazon EKS - DEV303 - Sao Paulo Summit
Executando Kubernetes com Amazon EKS -  DEV303 - Sao Paulo SummitExecutando Kubernetes com Amazon EKS -  DEV303 - Sao Paulo Summit
Executando Kubernetes com Amazon EKS - DEV303 - Sao Paulo SummitAmazon Web Services
 

Similar to Deep dive ECS & Fargate Deep Dive (20)

[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
 
Containers - State of the Union
Containers - State of the UnionContainers - State of the Union
Containers - State of the Union
 
Deep dive - AWS Fargate
Deep dive - AWS FargateDeep dive - AWS Fargate
Deep dive - AWS Fargate
 
Getting Started with Containers on AWS
Getting Started with Containers on AWSGetting Started with Containers on AWS
Getting Started with Containers on AWS
 
Semplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWSSemplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWS
 
Getting-started-with-containers on AWS
Getting-started-with-containers on AWSGetting-started-with-containers on AWS
Getting-started-with-containers on AWS
 
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
 
SRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS FargateSRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS Fargate
 
AWS 微服務中的 Container 選項比較 (Level 400)
AWS 微服務中的 Container 選項比較   (Level 400)AWS 微服務中的 Container 選項比較   (Level 400)
AWS 微服務中的 Container 選項比較 (Level 400)
 
Containers - State of the Union
Containers - State of the UnionContainers - State of the Union
Containers - State of the Union
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)
 
Deep Dive into Amazon Fargate
Deep Dive into Amazon FargateDeep Dive into Amazon Fargate
Deep Dive into Amazon Fargate
 
Modern Applications Web Day | Container Workloads on AWS
Modern Applications Web Day | Container Workloads on AWSModern Applications Web Day | Container Workloads on AWS
Modern Applications Web Day | Container Workloads on AWS
 
Orchestrating containers on AWS | AWS Floor28
Orchestrating containers on AWS | AWS Floor28Orchestrating containers on AWS | AWS Floor28
Orchestrating containers on AWS | AWS Floor28
 
Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018
 
使用 Amazon EKS 打造高效的服務架構設計
使用 Amazon EKS 打造高效的服務架構設計使用 Amazon EKS 打造高效的服務架構設計
使用 Amazon EKS 打造高效的服務架構設計
 
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Executando Kubernetes com Amazon EKS - DEV303 - Sao Paulo Summit
Executando Kubernetes com Amazon EKS -  DEV303 - Sao Paulo SummitExecutando Kubernetes com Amazon EKS -  DEV303 - Sao Paulo Summit
Executando Kubernetes com Amazon EKS - DEV303 - Sao Paulo Summit
 

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
 

Deep dive ECS & Fargate Deep Dive

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS & AWS Fargate John Segers | Zeist | October 11, 2018
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda • Container orchestration • ECS & Fargate concepts • Demo • ECS & Fargate concepts – Deep Dive
  • 3. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Running one container is easy
  • 4. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. But there are still moving pieces Server Guest OS Bins/Libs Bins/Libs App2App1
  • 5. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Managing many containers is hard Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS
  • 7. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What are container orchestration tools? Orchestration tools help us deploy, manage, and scale our containers, so we don’t need to do all the heavy lifting ourselves.
  • 8. What does the container landscape on AWS look like?
  • 9. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What does the landscape look like all together? Amazon ECS Amazon EKS Fargate mode for ECS Fargate mode for EKS (roadmap)
  • 10. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What are the services for? MANAGEMENT Deployment, Scheduling, Scaling & Management HOSTING Where the containers run Amazon EC2 IMAGE REGISTRY Container Image Repository
  • 11. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS Easiest way to deploy and manage containers Integration with entire AWS platform ALB, Auto Scaling, Batch, Elastic Beanstalk, CloudFormation, CloudTrail, CloudWatch Events, CloudWatch Logs, CloudWatch Metrics, ECR, EC2 Spot, IAM, NLB, Parameter Store, and VPC Scales to support clusters of any size Service integrations (like ALB and NLB) are at container level 1 2 3
  • 12. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 13. ““ GoPro Reduces Compute Footprint by 70% Using Containers on AWS GoPro needed a more efficient way to run microservices for its cloud- based video service, GoPro Plus. GoPro replaced a third-party process-management solution with Docker containers running on Amazon ECS. • Reduced Amazon EC2 footprint by 70% • Simplified cluster management • Adopted infrastructure as code for consistent deployment • Sped deployment of dev/test infrastructure SolutionChallenge Benefits By taking advantage of Amazon ECS, we have the power to understand, manipulate, and manage our environment easily. Zaven Boni, DevOps Engineering Lead, GoPro Company: GoPro Industry: Consumer Goods Country: United States Website: www.gopro.com About GoPro GoPro builds cameras, software, and accessories that help people around the world share their experiences in immersive and exciting ways.
  • 14. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS concepts EC2 INSTANCES ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container Internet LOAD BALANCER LOAD BALANCER
  • 15. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cluster of hosts on EC2 EC2 INSTANCES ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container Internet LOAD BALANCER LOAD BALANCER
  • 16. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS agent runs on hosts EC2 INSTANCES ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container Internet LOAD BALANCER LOAD BALANCER
  • 17. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS API to launch containers on clusters EC2 INSTANCES ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container Internet LOAD BALANCER LOAD BALANCER
  • 18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS API to launch containers on clusters EC2 INSTANCES ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container Internet LOAD BALANCER LOAD BALANCER
  • 19. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Traffic is sent to your hosts EC2 INSTANCES ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container Internet LOAD BALANCER LOAD BALANCER
  • 20. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS Agent Docker Agent OS EC2 Instance ECS Agent Docker Agent OS EC2 Instance ECS Agent Docker Agent OS EC2 Instance Elastic Container Service Where does Fargate come in then?
  • 21. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Elastic Container Service Where does Fargate come in then?
  • 22. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS Fargate mode Launch quickly Scale easily No infrastructure Resource based pricing Containers on demand Manage everything at container level
  • 23. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. How do I know when to use Fargate vs EC2 mode? Depends on your workload. Fargate: if you can configure with just a Task Definition, and you’re ok with awsvpc networking mode, try Fargate. Some caveats: can’t exec into the container, or access the underlying host (this is also a good thing) EC2 mode: good if you need to customize!
  • 24. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Demo time! Application Load Balancer Chat service Redis service Namespace Service Redis master CNAME x.x.x.x:6379 Service registry (See https://gitlab.com/ric_harvey/bl_practical_fargate)
  • 25. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Task definition { "family": “scorekeep", "containerDefinitions": [ { "name":“scorekeep-frontend", "image":"xxx.dkr.ecr.us-east-1.amazonaws.com/fe" }, { "name":“scorekeep-api", "image":"xxx.dkr.ecr.us-east-1.amazonaws.com/api" } ] } Immutable, versioned document Identified by family:version Contains a list of up to 10 container definitions All containers are co-located on the same host Each container definition has: • A name • Image URL (ECR or Public Images) • And more… Task Definition Snippet
  • 26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. { "family": "scorekeep", "cpu": "1 vCpu", "memory": "2 gb", "containerDefinitions": [ { "name":“scorekeep-frontend", "image":"xxx.dkr.ecr.us-east-1.amazonaws.com/fe“, "cpu": 256, "memoryReservation": 512 }, { "name":“scorekeep-api", "image":"xxx.dkr.ecr.us-east-1.amazonaws.com/api", "cpu": 768, "memoryReservation": 512 } ] } Units • CPU : cpu-units. 1 vCPU = 1024 cpu-units • Memory : MB Task Level Resources: • Total Cpu/Memory across all containers • Required fields for Fargate • Billing axis for Fargate Container Level Resources: • Defines sharing of task resources among containers • Optional fields Task Level Resources Container Level Resources Task Definition Snippet CPU and memory specification
  • 27. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS container networking none Tasks do not have external connectivity. host Container ports mapped directly to host ENI, bypassing Docker virtual network. bridge Default Docker mode, Tasks use Docker built-in virtual network inside containers. awsvpc ENI allocated per Task. Public IP address optional with Fargate; private only for EC2.
  • 28. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Need some more info on working with awsvpc? https://aws.amazon.com/blogs/compute/task- networking-in-aws-fargate/ https://aws.amazon.com/blogs/compute/introd ucing-cloud-native-networking-for-ecs- containers/
  • 29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Service discovery Load Balancers Key-value store Service Mesh Service registry
  • 30. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Managed service discovery for ECS You build apps where services are invoked by name & name resolves to IP/port dynamically You turn on service discovery during deployment — service creation DEV OPS
  • 31. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS updates Service Registry based on naming convention, task registrations, de-registrations and health Route 53 provides Service Registry Route 53ECS ECS service discovery powered by Route 53
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Route 53 provides APIs to create • Namespace • CNAME per service autoname • A records per task IP • SRV records per task IP + portService CNAME: A / SRV record Namespace Route 53 provides Service Registry
  • 33. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cluster: myapp AZ 1 AZ 2 app 10.0.6.5:8080 web 10.0.8.6:8080 app 10.0.4.5:8080 web 10.0.3.6:8080 Namespace: myapp.local Service web.myapp.local CNAME 10.0.4.5:8080 10.0.3.6:8080 Service app.myapp.local CNAME 10.0.6.5:8080 10.0.8.6:8080 ECS updates service endpoints in Route 53
  • 34. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Data volumes in ECS tasks Bind mounts Supported with EC2 and Fargate modes Fargate-managed volume: 4 GB per task No persistent volumes with Fargate Docker volumes Supported in EC2 mode Built-in local & third-party volume drivers supported { ”volumes”: [ { ”name”: “database_scratch” } ], "containerDefinitions": [ { "image": "my-repo/database", "mountPoints": [ { "containerPath": "/var/scratch", "sourceVolume": "database_scratch" } ], "name": "database1” }, { "image": "my-repo/database", "mountPoints": [ { "containerPath": "/var/scratch", "sourceVolume": "database_scratch” } ], "name": "database2” } ], ... }
  • 35. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Task placement Cluster Constraints Custom Constraints Placement Strategies Apply Filter Satisfy CPU, memory, and port requirements Filter for location, instance-type, AMI, or custom attribute constraints Identify instances that meet spread or binpack placement strategy Select final container instances for placement
  • 36. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. g2.2xlarge t2.small t2.micro t2.medium t2.medium t2.small g2.2xlarge t2.small us-east-1aus-east-1d g2.2xlarge t2.medium t2.micro t2.small us-east-1c Placement: Spread across Zone and Binpack
  • 37. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. g2.2xlarge t2.small t2.micro t2.medium t2.medium t2.small g2.2xlarge t2.small us-east-1aus-east-1d g2.2xlarge t2.medium t2.micro t2.small us-east-1c Placement: Spread across Zone and Binpack
  • 38. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS EC2 mode vs Fargate • Change in networking mode: "awsvpc” only for Fargate • Specify container port, no host port: "portMappings": [{"containerPort": ”8081"}] • Only ALB or NLB. ALB needs to use target type IP, not instance. • Launch Type: Fargate • Data volumes • Fargate data volumes fixed in size, no Docker volumes • No hosts to manage with Fargate • Use EC2 mode if you need host access
  • 39. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. “We moved to AWS Fargate because we need the ability to scale quickly up from baseline, run multi-container workloads, and get fine- grained network control, without having to manage our own infrastructure.”
  • 40. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. https://medium.com/containers-on- aws/choosing-your-container-environment- on-aws-with-ecs-eks-and-fargate- cfbe416ab1a Need more info on how to choose?
  • 41. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Need help migrating between Fargate and EC2? https://aws.amazon.com/blogs/compute/migr ating-your-amazon-ecs-containers-to-aws- fargate/
  • 42. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bonus: where can I learn more?
  • 43. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. CLIs for Fargate/ECS: aws-cli: the official OG. Open source, includes most AWS services. • More info here: https://aws.amazon.com/cli/ • Github here: https://github.com/aws/aws-cli ecs-cli: also official, but just for ECS. Supports docker compose files. • More info here: https://github.com/aws/amazon-ecs-cli Some good unofficial options: Fargate cli: https://github.com/jpignata/fargate Coldbrew cli: https://github.com/coldbrewcloud/coldbrew-cli
  • 44. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. The awesome-ecs project: https://github.com/nathanpeck/awesome-ecs
  • 45. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Workshops! From @brentcontained https://t.co/ba0usbZqHN
  • 46. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. ECS two ways From @arungupta https://github.com/arun-gupta/ecs-workshop From @abbyfuller https://github.com/abby-fuller/ecs-demo
  • 47. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! John Segers | jsegers@amazon.com | @jplsegers