ECS Flashcards

1
Q

What are the ECS launch types?

A

EC2
* launches EC2 instances to run the docker containers by running ECS agent on the instances
* you need to maintain the EC2 instances

Fargate
* serverless
* you do not need to maintain the infrastructure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are IAM roles for ECS?

A

EC2 instance profile
* used by the ECS agent on EC2 launch type
ECS task role
* allows each task to have a specific role

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What if you want to persist data on ECS?

A

You will need to mount EFS file systems onto ECS tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the two types of scaling on EC2 launch type?

A

Auto scaling group scaling
* scale your ASG based on CPU utilization
* Add EC2 instances over time

ECS cluster capacity provider
* automatically provision and scale the infrastructure for the ECS tasks
* capacity provider paired with an ASG

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens when a version update happens on ECS?

A

A rolling update is performed. So, tasks with the new version are born, while old tasks are still up. When new version is healthy, old tasks are killed.
Minimum and maximum healthy percent can be set.
* minimum - how much is allowed to terminate when performing a version update - old version
* maximum - how much is allowed to create when performing a version update - new version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are ECS task definitions?

A

Are the metadata in JSON form to tell ECS how to run the docker container.
Env variables can be hardcoded, on SSM, Secrets manager and S3
Data volumes are shared data between multiple containers in the task definition, use case: share ephemeral data between containers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are ECS task placements strategies and its benefits?

A
  • Binpack - place tasks based on the least available of CPU or memory. Good for saving money - tries to fill up containers on a single instance
  • Random
  • Spread - place the task evenly based on the specified value - AZ, InstanceId…
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are ECS task placements constraints?

A

Are restrictions where to not place the task. Example:
* distinctInstance - place each task on a different instance
* memberOf - places task on instances that satisfy an expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly