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
What does Amazon ECS Auto Scaling use?
AWS Application Auto Scaling
25
What does ECS Service Auto Scaling do?
Automatically increase/decrease the desired number of ECS tasks
26
ECS Service Auto Scaling = EC2 Auto Scaling
False. ECS - task level EC2 - instance level
27
Features: - ECS Service Average CPU Utilization - ECS Service Average Memory Utilization - Scale on RAM - ALB Request Count Per Target – metric coming from the ALB
AWS Application Auto Scaling
28
How can you accommodate ECS Service Scaling?
Add underlying EC2 instances
29
What is Auto Scaling Group Scaling?
- Scale your ASG based on CPU Utilization - Add EC2 instances over time
30
What is ECS Cluster Capacity Provider?
- Used to automatically provision and scale the infrastructure for your ECS Tasks -Add EC2 Instances when you’re missing capacity (CPU, RAM...)
31
What is a Capacity Provider paired with an Auto Scaling Group?
ECS Cluster Capacity Provider
32
How does ECS rolling updates work?
When updating from v1 to v2, we can control how many tasks can be started and stopped, and in which order
33
What is an Amazon ECS "Task Definition"?
Metadata in JSON form to tell ECS how to run a Docker container
34
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)
Task Definitions
35
How can you share data between multiple containers in the same Task Definition?
Data Volumes (Bind Mounts)
35
What kind of data do EC2Tasks use?
EC2 instance storage
36
When using EC2 instance data volume to what is the data are tied to?
Lifecycle of the EC2 instance
36
What kind of data do Fargate Tasks use?
Ephemeral storage
36
When an ECS task is started with EC2 Launch Type, ECS must determine where to......., with the constraints of ...... and ........
place it, CPU, memory (RAM)
36
When using Fargate Tasks data volume to what is the data are tied to?
The container using them.
37
When a service scales in, ECS needs to....... which task to......
determine, terminate
38
39
Features: - - 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
The process to select the appropriate EC2 Container instance when Amazon ECS places a task
40
Features: - Binpack - Random - Spread - You can mix them together
Task Placement Strategies
41
What are two Task Placement Constraints?
- distinctInstance - memberOf
42
Task Placement Constraints - distinctInstance
Tasks are placed on a different EC2 instance
43
Task Placement Constraints - memberOf
- Tasks are placed on EC2 instances that satisfy a specified expression - Uses the Cluster Query Language (advanced)
44
What is Amazon ECR?
Elastic Container Registry
45
What does Amazon ECR do?
Store and manage Docker images on AWS
46
What does AWS Copilot do?
CLI tool to build, release, and operate production-ready containerized apps
47
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...
AWS Copilot
48
What is Amazon EKS?
Amazon Elastic Kubernetes Service
49
What does Elastic Kubernetes Service do?
It is a way to launch managed Kubernetes clusters on AWS
50
What is Kubernates?
an open-source system for automatic deployment, scaling and management of containerized (usually Docker) application
51
How can you deploy workers nodes or serverless containers on with EKS?
EC2 for worker nodes Fargate for serverless containers
52
How can you run EKS on multiple regions?
Deploy on EKS cluster per region.
53
Amazon EKS – Node Types?
- Managed Node Groups - Self-Managed Nodes - AWS Fargate
54
Node Types: No maintenance required; no nodes managed
AWS Fargate
55
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
- Self-Managed Nodes
56
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
Managed Node Groups
57
Need to specify..... manifest on your EKS cluster
StorageClass