ECS, ECR & Fargate - Docker in AWS Flashcards

1
Q

What is Docker?

A

A software development platform to deploy apps

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

How does Docker work?

A

Packages apps in containers that can be run on any OS

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

Two types of Docker Repositories?

A
  1. Docker Hub (public repo)
  2. Amazon ECR (amazon docker repo)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where are Docker images stored?

A

Docker Repositories

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

What is Amazon ECR?

A

Amazon Elastic Container Registry

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

Amazon’s own container platform?

A

Amazon Elastic Container Service (Amazon ECS)

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

Amazon’s managed Kubernetes (open source)?

A

Amazon Elastic Kubernetes Service (Amazon EKS)

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

What is Amazon’s own Serverless container platform and works with ECS and with EKS?

A

AWS Fargate

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

Amazon service that stores container images

A

Amazon ECR

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

How do you launch Docker containers using EC2 Launch Type in Amazon ECS?

A

Launch ECS tasks on an ECS cluster with EC2 instances.

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

Each EC2 Instance ….. the ….. to register in the ECS Cluster

A

must run, ECS Agent

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

When must you provision & maintain the infrastructure (the EC2 instances)

A

When running ECS with a EC2 Launch type.

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

When running EC2 launch type on ECS what will AWS take care of?

A

starting / stopping container

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

What is a launch type?

A

A configuration that determines how your Docker containers are deployed and ran.

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

What does Amazon Elastic Container Service do?

A

Orchestrates container deployment, and launch types specify the underlying infrastructure used by ECS to run those containers.

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

How do you launch Docker containers using Fargate Launch Type in Amazon ECS?

A

It’s serverless, no need to provision infrastructure.

You just create task definitions

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

When running Fargate launch type on ECS what will AWS take care of?

A

AWS just runs ECS Tasks for you based on the CPU / RAM you need

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

How can you scale your Fargate launch Type containers?

A

Just increase the number of tasks.

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

Features:
- 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

A

EC2 Instance Profile (EC2 Launch Type only)

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

Features:
- 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

A

ECSTask Role

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

Which ELB is supported and works for most use cases in Amazon ECS

A

Application Load Balancer

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

Which ELB is recommended only for high throughput / high performance use cases, or to pair it with AWS Private Link in Amazon ECS

A

Network Load Balancer

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

Can you mount EFS file systems onto ECS tasks?

A

Yes

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

Can Amazon S3 be mounted as a file system?

A

No

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

What does Amazon ECS Auto Scaling use?

A

AWS Application Auto Scaling

25
Q

What does ECS Service Auto Scaling do?

A

Automatically increase/decrease the desired number of ECS tasks

26
Q

ECS Service Auto Scaling = EC2 Auto Scaling

A

False.
ECS - task level
EC2 - instance level

27
Q

Features:
- ECS Service Average CPU Utilization
- ECS Service Average Memory Utilization - Scale on RAM
- ALB Request Count Per Target – metric coming from the ALB

A

AWS Application Auto Scaling

28
Q

How can you accommodate ECS Service Scaling?

A

Add underlying EC2 instances

29
Q

What is Auto Scaling Group Scaling?

A
  • Scale your ASG based on CPU Utilization
  • Add EC2 instances over time
30
Q

What is ECS Cluster Capacity Provider?

A
  • Used to automatically provision and scale the infrastructure for your ECS Tasks
    -Add EC2 Instances when you’re missing capacity (CPU, RAM…)
31
Q

What is a Capacity Provider paired with an Auto Scaling Group?

A

ECS Cluster Capacity Provider

32
Q

How does ECS rolling updates work?

A

When updating from v1 to v2, we can control how many tasks can be started
and stopped, and in which order

33
Q

What is an Amazon ECS “Task Definition”?

A

Metadata in JSON form to tell ECS how to run a Docker container

34
Q

contains crucial information:
- Image Name
- Port Binding for Container and Host
- Memory and CPU required
- Environment variables
- Networking information
- IAM Role
- Logging configuration (ex CloudWatch)

A

Task Definitions

35
Q

How can you share data between multiple containers in the same Task Definition?

A

Data Volumes (Bind Mounts)

35
Q

What kind of data do EC2Tasks use?

A

EC2 instance storage

36
Q

When using EC2 instance data volume to what is the data are tied to?

A

Lifecycle of the EC2 instance

36
Q

What kind of data do Fargate Tasks use?

A

Ephemeral storage

36
Q

When an ECS task is started with EC2 Launch Type, ECS must determine where to……., with the constraints of …… and ……..

A

place it, CPU, memory (RAM)

36
Q

When using Fargate Tasks data volume to what is the data are tied to?

A

The container using them.

37
Q

When a service scales in, ECS needs to……. which task to……

A

determine, terminate

38
Q
A
39
Q
- Identify which instances that satisfy the CPU, memory, and port requirements
- Identify which instances that satisfy the Task Placement Constraints
- Identify which instances that satisfy the Task Placement Strategies
- Select the instances
A

The process to select the appropriate EC2 Container instance when Amazon ECS places a task

40
Q

Features:
- Binpack
- Random
- Spread
- You can mix them together

A

Task Placement Strategies

41
Q

What are two Task Placement Constraints?

A
  • distinctInstance
  • memberOf
42
Q

Task Placement Constraints

  • distinctInstance
A

Tasks are placed on a different EC2 instance

43
Q

Task Placement Constraints

  • memberOf
A
  • Tasks are placed on EC2 instances that satisfy a specified expression
  • Uses the Cluster Query Language (advanced)
44
Q

What is Amazon ECR?

A

Elastic Container Registry

45
Q

What does Amazon ECR do?

A

Store and manage Docker images on AWS

46
Q

What does AWS Copilot do?

A

CLI tool to build, release, and operate production-ready containerized apps

47
Q

Features:
- Run your apps on AppRunner, ECS, and Fargate
- Helps you focus on building apps rather than setting up infrastructure
- Automated deployments with one command using CodePipeline
- Deploy to multiple environments
- Troubleshooting, logs, health status…

A

AWS Copilot

48
Q

What is Amazon EKS?

A

Amazon Elastic Kubernetes Service

49
Q

What does Elastic Kubernetes Service do?

A

It is a way to launch managed Kubernetes clusters on AWS

50
Q

What is Kubernates?

A

an open-source system for automatic deployment, scaling and management of containerized (usually Docker) application

51
Q

How can you deploy workers nodes or serverless containers on with EKS?

A

EC2 for worker nodes

Fargate for serverless containers

52
Q

How can you run EKS on multiple regions?

A

Deploy on EKS cluster per region.

53
Q

Amazon EKS – Node Types?

A
  • Managed Node Groups
  • Self-Managed Nodes
  • AWS Fargate
54
Q

Node Types:
No maintenance required; no nodes managed

A

AWS Fargate

55
Q

Node Types:
- Nodes created by you and registered to the EKS cluster and managed by an ASG
- You can use prebuilt AMI - Amazon EKS Optimized AMI
- Supports On-Demand or Spot Instances

A
  • Self-Managed Nodes
56
Q

Node Types:
- Creates and manages Nodes (EC2 instances) for you
- Nodes are part of an ASG managed by EKS
- Supports On-Demand or Spot Instances

A

Managed Node Groups

57
Q

Need to specify….. manifest on your EKS cluster

A

StorageClass