ECS, ECR, Fargate Flashcards
1
Q
What is Docker?
A
- Docker is a software development platform to deploy apps
- Apps are packaged in containers that can be run on any OS
2
Q
Where can you store Docker Images?
A
- Docker Hub (https://hub.docker.com)
- Public repository
- Amazon ECR (Amazon Elastic Container Registry)
– Private repository
– Public repository (Amazon ECR Public Gallery https://gallery.ecr.aws)
3
Q
Describe how to run Docker
A
- Create a Docker file
- Build the image
- Push / pull from Docker repository
- Run the image on the container
4
Q
What is Amazon ECS?
A
- Amazon Elastic Container Service (Amazon ECS)
- Amazon’s own container platform
5
Q
What is Amazon EKS?
A
- Amazon Elastic Kubernetes Service (Amazon EKS)
- Amazon’s managed Kubernetes (open source)
6
Q
What is AWS Fargate?
A
- Amazon’s own Serverless container platform
- Works with ECS and with EKS
7
Q
What is Amazon ECR?
A
Store container images
8
Q
Describe Amazon ECS - EC2 Launch Type
A
- Launch Docker containers on AWS = Launch ECS Tasks on ECS Clusters
- EC2 Launch Type: you must provision & maintain the infrastructure (the EC2
instances) - Each EC2 Instance must run the ECS Agent to register in the ECS Cluster
- AWS takes care of starting / stopping containers
9
Q
Describe Amazon ECS - Fargate Launch Type
A
- You do not provision the infrastructure (no EC2 instances to manage)
- It’s all Serverless!
- You just create task definitions
- AWS just runs ECS Tasks for you based on the CPU / RAM you need
- To scale, just increase the number of tasks. Simple - no more EC2 instances
10
Q
What are the 2 main IAM roles setting you have to know for ECS?
A
- EC2 Instance Profile
– Used by the ECS agent
– Makes API calls to ECS service
– Send container logs to CloudWatch Logs
– Pull Docker image from ECR
– Reference sensitive data in Secrets Manager or SSM Parameter Store - ECS Task Role
– Allows each task to have a specific role
– Use different roles for the different ECS Services you run
– Task Role is defined in the task definition
11
Q
Which Load Balancer integrations are supported with Amazon ECS?
A
- ALP
- NLB
12
Q
Whats the usage of Data Volumes (EFS) in ECS?
A
- Mount EFS file systems onto ECS tasks
- Works for both EC2 and Fargate launch types
- Tasks running in any AZ will share the same data in the EFS file system
- Fargate + EFS = Serverless
13
Q
What is the typical use case of EFS in ECS?
A
Persistent multi-AZ shared storage for your containers
14
Q
What is ECS Service Auto Scaling?
A
- Automatically increase/decrease the desired number of ECS tasks
- Amazon ECS Auto Scaling uses AWS Application Auto Scaling
15
Q
What are the metrics that can be used to setup Service Auto Scaling in ECS?
A
- ECS Service Average CPU Utilization
- ECS Service Average Memory Utilization - Scale on RAM
- ALB Request Count Per Target – metric coming from the ALB