SlideShare a Scribd company logo
1 of 24
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Getting started with Amazon Elastic
ContainerService (ECS)
Container Orchestration & Management on AWS
Ioannis Polyzos
Senior Solutions Architect
Amazon Web Services (AWS)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
• Containers
• Amazon ECR
• Amazon ECS
• Demo
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
First things first…
• What are containers and why
are customers using them?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why arecompanies
adoptingcontainers?
© 2022, Amazon Web Services, Inc. or its Affiliates.
• Accelerate software development
• Build modern applications
• Automate operations at web scale
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its Affiliates.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Managing many containers is hard
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon Elastic
ContainerRegistry
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is Amazon ECR
F U L L Y - M A N A G E D C O N T A I N E R A R T I F A C T R E G I S T R Y
AWS Cloud
Availability Zone
VPC
Availability Zone Availability Zone
AmazonECR
Compute
Push
Pull
Amazon EKS Amazon ECS AWS Fargate
On premises and
other clouds
Managed and scalable
infrastructure
Highly available,
high performance
Security with encrypted
images and vulnerability
scans
Authenticated access,
centralized IAM control
Docker and OCI compliant to
pull anywhere
Nativeintegration to AWS orchestrators and compute
Container images, Helm
charts, OCI artifacts
Amazon EC2
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AmazonElastic
Container Service
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scheduling and Orchestration
Cluster Manager Placement Engine
ECS
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its Affiliates.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS constructs
Cluster
• Resourcegrouping and isolation
• IAM permissions boundary
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS constructs
Cluster
• Resourcegrouping and isolation
• IAM permissions boundary
Container
Instance
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS constructs
Cluster
• Resourcegrouping and isolation
• IAM permissions boundary
Task
• Running instanceof a task
definition
• One or morecontainers
Task definition
• Templateused by Amazon ECS to
launch tasks
• Parallels to docker run parameters
• Defines requirements:
• CPU/Memory
• Container image(s)
• Logging
• IAM role
• Etc.
Container 1 Container 1
{ ; }
JSON
Container
Instance
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS constructs
Cluster
• Resourcegrouping and isolation
• IAM permissions boundary
Service
• Maintains desired # of running
tasks
• Replaces unhealthy tasks
• ELB integration
Task
• Running instanceof a task
definition
• One or morecontainers
Task definition
• Templateused by Amazon ECS to
launch tasks
• Parallels to docker run parameters
• Defines requirements:
• CPU/Memory
• Container image(s)
• Logging
• IAM role
• Etc.
Container 1
Container 1
Container 1
Container 1 Container 1
{ ; }
JSON
Container
Instance
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Taskdefinition
{
"containerDefinitions": [
{
"memory": 128,
"portMappings": [
{
"hostPort": 80,
"containerPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"name": "nginx-container",
"image": "nginx",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "ecs-log-streaming",
"awslogs-region": "us-west-2",
"awslogs-stream-prefix": "fargate-task-1"
}
},
continued…
"cpu": 0
}
],
"networkMode": "awsvpc",
"executionRoleArn":
"arn:aws:iam::123456789012:role/ecsTas
kExecutionRole",
"memory": "2048",
"cpu": "1024",
"requiresCompatibilities": [
"FARGATE"
],
"family": "example_task_1"
}
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Deploying on ECS: Tasks vs Services
On-Demand Workloads
ECS task scheduler
Run once or at intervals
Batch jobs
RunTask API
StartTask (custom)
Long-Running Apps
ECS service scheduler
Health management
Scale-up and scale-down
AZ aware
Grouped containers
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Taskplacement
Cluster Constraints
Custom Constraints
Placement Strategies
Apply Filter
Satisfy CPU,memory, and networking requirements
Filter forlocation,instance-type, AMI, orother
custom attribute constraints
Identify instances that meet spread or binpack
placement strategy
Select final container instances forplacement
Amazon ECS powers Amazon
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Fargate
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Without Fargate, you end up managing more than just containers
EC2 Instance
ECS
Agent
Container
Rungime
OS
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
DEMO
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you for attending!
Ioannis Polyzos
Senior Solutions Architect
ipolyzos@amazon.com
@ipolyzos

More Related Content

Similar to Getting started with Amazon ECS

Trusted Application Delivery: Achieving Ultimate Security
Trusted Application Delivery: Achieving Ultimate SecurityTrusted Application Delivery: Achieving Ultimate Security
Trusted Application Delivery: Achieving Ultimate SecurityWeaveworks
 
AWSome Day Online 2020_Modul 2: Memulai dengan Cloud
AWSome Day Online 2020_Modul 2: Memulai dengan CloudAWSome Day Online 2020_Modul 2: Memulai dengan Cloud
AWSome Day Online 2020_Modul 2: Memulai dengan CloudAmazon Web Services
 
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks
 
Serverless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftServerless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftAmazon 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
 
AWSome Day Online 2020_โมดูล 2: เริ่มต้นใช้งานบน AWS Cloud
AWSome Day Online 2020_โมดูล 2: เริ่มต้นใช้งานบน AWS CloudAWSome Day Online 2020_โมดูล 2: เริ่มต้นใช้งานบน AWS Cloud
AWSome Day Online 2020_โมดูล 2: เริ่มต้นใช้งานบน AWS CloudAmazon Web Services
 
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Amazon Web Services
 
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...Amazon Web Services
 
Securing serverless and container services - SDD306 - AWS re:Inforce 2019
Securing serverless and container services - SDD306 - AWS re:Inforce 2019 Securing serverless and container services - SDD306 - AWS re:Inforce 2019
Securing serverless and container services - SDD306 - AWS re:Inforce 2019 Amazon Web Services
 
Getting Started with Serverless and Container Architectures
Getting Started with Serverless and Container ArchitecturesGetting Started with Serverless and Container Architectures
Getting Started with Serverless and Container ArchitecturesAmazon 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
 
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
 
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
 

Similar to Getting started with Amazon ECS (20)

Deep Dive into Amazon Fargate
Deep Dive into Amazon FargateDeep Dive into Amazon Fargate
Deep Dive into Amazon Fargate
 
Compute@Scale
Compute@ScaleCompute@Scale
Compute@Scale
 
Trusted Application Delivery: Achieving Ultimate Security
Trusted Application Delivery: Achieving Ultimate SecurityTrusted Application Delivery: Achieving Ultimate Security
Trusted Application Delivery: Achieving Ultimate Security
 
AWSome Day Online 2020_Modul 2: Memulai dengan Cloud
AWSome Day Online 2020_Modul 2: Memulai dengan CloudAWSome Day Online 2020_Modul 2: Memulai dengan Cloud
AWSome Day Online 2020_Modul 2: Memulai dengan Cloud
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
Serverless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftServerless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up Loft
 
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
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
AWSome Day Online 2020_โมดูล 2: เริ่มต้นใช้งานบน AWS Cloud
AWSome Day Online 2020_โมดูล 2: เริ่มต้นใช้งานบน AWS CloudAWSome Day Online 2020_โมดูล 2: เริ่มต้นใช้งานบน AWS Cloud
AWSome Day Online 2020_โมดูล 2: เริ่มต้นใช้งานบน AWS Cloud
 
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
 
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
 
Securing serverless and container services - SDD306 - AWS re:Inforce 2019
Securing serverless and container services - SDD306 - AWS re:Inforce 2019 Securing serverless and container services - SDD306 - AWS re:Inforce 2019
Securing serverless and container services - SDD306 - AWS re:Inforce 2019
 
Getting Started with Serverless and Container Architectures
Getting Started with Serverless and Container ArchitecturesGetting Started with Serverless and Container Architectures
Getting Started with Serverless and Container Architectures
 
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
 
AWS for VMware Admins
AWS for VMware AdminsAWS for VMware Admins
AWS for VMware Admins
 
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)
 
Introduction to Container Management on AWS
Introduction to Container Management on AWSIntroduction to Container Management on AWS
Introduction to Container Management on AWS
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Getting started with Amazon ECS

  • 1. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Getting started with Amazon Elastic ContainerService (ECS) Container Orchestration & Management on AWS Ioannis Polyzos Senior Solutions Architect Amazon Web Services (AWS)
  • 2. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda • Containers • Amazon ECR • Amazon ECS • Demo
  • 3. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. First things first… • What are containers and why are customers using them?
  • 4. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why arecompanies adoptingcontainers? © 2022, Amazon Web Services, Inc. or its Affiliates. • Accelerate software development • Build modern applications • Automate operations at web scale
  • 5. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its Affiliates.
  • 6. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Managing many containers is hard
  • 7. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its Affiliates. Amazon Elastic ContainerRegistry
  • 8. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. What is Amazon ECR F U L L Y - M A N A G E D C O N T A I N E R A R T I F A C T R E G I S T R Y AWS Cloud Availability Zone VPC Availability Zone Availability Zone AmazonECR Compute Push Pull Amazon EKS Amazon ECS AWS Fargate On premises and other clouds Managed and scalable infrastructure Highly available, high performance Security with encrypted images and vulnerability scans Authenticated access, centralized IAM control Docker and OCI compliant to pull anywhere Nativeintegration to AWS orchestrators and compute Container images, Helm charts, OCI artifacts Amazon EC2
  • 9. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. AmazonElastic Container Service
  • 10. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scheduling and Orchestration Cluster Manager Placement Engine ECS
  • 11. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its Affiliates.
  • 12.
  • 13. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS constructs Cluster • Resourcegrouping and isolation • IAM permissions boundary
  • 14. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS constructs Cluster • Resourcegrouping and isolation • IAM permissions boundary Container Instance
  • 15. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS constructs Cluster • Resourcegrouping and isolation • IAM permissions boundary Task • Running instanceof a task definition • One or morecontainers Task definition • Templateused by Amazon ECS to launch tasks • Parallels to docker run parameters • Defines requirements: • CPU/Memory • Container image(s) • Logging • IAM role • Etc. Container 1 Container 1 { ; } JSON Container Instance
  • 16. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS constructs Cluster • Resourcegrouping and isolation • IAM permissions boundary Service • Maintains desired # of running tasks • Replaces unhealthy tasks • ELB integration Task • Running instanceof a task definition • One or morecontainers Task definition • Templateused by Amazon ECS to launch tasks • Parallels to docker run parameters • Defines requirements: • CPU/Memory • Container image(s) • Logging • IAM role • Etc. Container 1 Container 1 Container 1 Container 1 Container 1 { ; } JSON Container Instance
  • 17. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Taskdefinition { "containerDefinitions": [ { "memory": 128, "portMappings": [ { "hostPort": 80, "containerPort": 80, "protocol": "tcp" } ], "essential": true, "name": "nginx-container", "image": "nginx", "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "ecs-log-streaming", "awslogs-region": "us-west-2", "awslogs-stream-prefix": "fargate-task-1" } }, continued… "cpu": 0 } ], "networkMode": "awsvpc", "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTas kExecutionRole", "memory": "2048", "cpu": "1024", "requiresCompatibilities": [ "FARGATE" ], "family": "example_task_1" }
  • 18. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Deploying on ECS: Tasks vs Services On-Demand Workloads ECS task scheduler Run once or at intervals Batch jobs RunTask API StartTask (custom) Long-Running Apps ECS service scheduler Health management Scale-up and scale-down AZ aware Grouped containers
  • 19. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Taskplacement Cluster Constraints Custom Constraints Placement Strategies Apply Filter Satisfy CPU,memory, and networking requirements Filter forlocation,instance-type, AMI, orother custom attribute constraints Identify instances that meet spread or binpack placement strategy Select final container instances forplacement
  • 21. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Fargate
  • 22. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Without Fargate, you end up managing more than just containers EC2 Instance ECS Agent Container Rungime OS
  • 23. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. DEMO
  • 24. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you for attending! Ioannis Polyzos Senior Solutions Architect ipolyzos@amazon.com @ipolyzos