ECS Flashcards

1
Q

What is ECR?

A

Elastic Container Registry

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

What does ECR do?

A

It stores all private Docker images

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

What are the 3 choices for a container management platform?

A
  • ECS
  • FarGate
  • EKS for Kubernetes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does an EC2 instance get added to an ECS cluster?

A

The instance runs the ECS Agent, which registers it with the cluster

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

What is an ECS Task Definition?

A

It is a JSON file that tells ECS how to run a Docker container

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

What 5 main aspects does a Task Definition include?

A
  • Image Name
  • Port Binding for container host
  • Memory and CPU required
  • Environment variables
  • Networking information
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you retrieve the login command to use to authenticate your Docker client to your registry in ECR?

A

run: $(aws ecr get-login –no-include-email –region us-east-1)

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

What command do you use to build your Docker image?

A

docker build -t

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

What command do you run after the build completes?

A

The tag command: docker tag : /::

docker tag demo:latest 2343234.dkr.ecr.us-east-1.amazonaws.com/demo:latest

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

What command will push the image?

A

docker push 2343234.dkr.ecr.us-east-1.amazonaws.com/demo:latest

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

What command will pull the image locally?

A

docker pull 2343234.dkr.ecr.us-east-1.amazonaws.com/demo:latest

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

What are the 3 flavors of ECS and what do they do?

A
  • ECS Classic allows you to provisionEC2 instances to run your container on
  • Fargate which is Serverless ECS
  • EKS which is managed Kubernetes by AWS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are 5 characteristics of ECS Classic?

A
  • EC2 instances must be created
  • We must configure file /etc/ecs/ecs.config with the cluster name
  • The EC2 instance must run the ECS Agent
  • EC2 instances can run multiple containers
  • ECS tasks can have IAM roles to execute actions against AWS services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What 3 things are required for an EC2 instance to run multiple containers?

A
  • You must not select a host port, only a container port
  • You should use an ALB with dynamic ort mapping
  • The EC2 instance security group must allow traffic from the ALB on all ports
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

For ECS Classic, what level does a security group operate at?

A

Instance level, not task level

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