ECS Flashcards

1
Q

What is ECS “Cluster Query Language” used for?

A

Cluster queries are expressions that allow you to group objects. For example, you can group container instances by attributes such as Availability Zone, instance type, or custom metadata. For more information, see Attributes.

After you have defined a group of container instances, you can customize Amazon ECS to place tasks on container instances based on group.

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

What is an ECS “Cluster?”

A

A group of container instances. A cluster can:
– be a mix of EC2 and Fargate
– run multiple tasks

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

What is the relationship between a container, a Docker Image, and a Dockerfile?

A

A Dockerfile is used to create a Docker Image (each step creates file system layers). A container is a running copy of a Docker Image, similar to how an EC2 instance is a running copy of an EBS boot disk.

One exception to the generality: In addition to the Docker Image layers, a Docker Container includes one additional Read / Write Layer which differentiates two Containers

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

ECS runs in which two modes?

A

EC2 and Fargate

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

What is a “container definition?” What purpose does it serve?

A

It tells ECS where your container definition is (i.e., in a registry), which port the container uses,

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

What is an ECS task?

A

A self-contained application. Stores whatever container definitions are used to make up that one application. A “task definition” stores a lot of configuration information about the task (including an IAM Role the task can assume)

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

What does an ECS Service govern?

A

How we want an ECS task to scale. Can allow multiple tasks to run, even behind a load balancer. What you would use for business-critical applications running in AWS.

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

With EC2 Mode of ECS, who provisions the underlying EC2 instances, and who manages them?

A

ECS will PROVISION them, but YOU must manage them. They will appear in your account. ECS will do the following: Container Placement and Orchestration, Cluster Management, Placement Engine.

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

With ECS Fargate, where are the containers launched

A

In a “shared Fargate infrastructure platform.” Still use targets and services to define what you want to run, but these are deployed to the shared Fargate platform.

Each task (running in the Fargate instance) is “injected” into your VPC using an ENI (with an IP address in the VPC).

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

Where do you configure the permissions ECS needs to access other AWS services?

A

In the ECS Task “Task Role” (in the Task Definition)

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

How many roles does (a) ECS on EC2 and (b) ECS Fargate require?

A

ECS on EC2 requires two:
– one in the Instance Profile
– one in the Task Definition

ECS on Fargate only requires one in the Task Definition

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