This document discusses containers and Amazon ECS. It provides an overview of containers and their benefits like portability and efficiency. It then describes Amazon ECS and how it provides a fully managed container orchestration service. Key aspects covered include clusters, tasks, services, and scheduling. It also outlines some benefits of Amazon ECS like elastic scaling and integration with other AWS services. Finally, it provides steps to run services using the ECS CLI to register a task definition and create a cluster and service.
8. Containers are natural for microservices
Simple to model
Any app, any language
Image is the version
Test and deploy same artifact
Stateless servers decrease change risk
10. 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
.. to this—is hard!
12. Amazon EC2 Container Service (ECS) is a highly
scalable, high performance container management
service that supports Docker containers and allows you
to easily run applications on a managed cluster of
Amazon EC2 instances.
13. Amazon ECS
AMAZON EC2 INSTANCES
LOAD
BALANCER
Internet
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
LOAD
BALANCER
22. Amazon ECS benefits
• Fully managed elastic service—you don’t need
to run anything, and the service scales as your
microservices architecture grows
• Shared state optimistic scheduling
• Deep integration with other AWS services
• Application Load Balancing
• Amazon Elastic Block Store
• Amazon Virtual Private Cloud
• Amazon CloudWatch
• AWS Identity and Access Management
• AWS CloudTrail
23. Routing via Application Load Balancer
Path-based routing
Allows you to define rules that route traffic to different target groups based on the path of a URL.
e.g. example.com/test , example.com/test/test1
Dynamic Port Mapping
Provides the ability to load-balance across multiple ports on the same Amazon EC2 instance. This functionality
specifically targets the use of containers and is integrated into Amazon ECS.
HTTP/2
WebSockets
Detailed Logging
24. Deploying containers on ECS—choose a scheduler
Batch Jobs
ECS task scheduler
Run tasks once
Batch jobs
RunTask (random)
StartTask (placed)
Long-Running Apps
ECS service scheduler
Health management
Scale-up and scale-down
AZ aware
Grouped containers