ECS, ECR and Fargate Flashcards

(35 cards)

1
Q

Amazon ECS

A

Simplifies process of running, managing and scaling containerised applications by providing manager service that takes care of it for you

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

ECS - EC2 Launch Type

A

Containerised applications run on a cluster of EC2 instances that you manage

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

ECS - Fargate Launch Type

A

Provides a serverless experience where you don’t need to manage instances; AWS automatically provisions and scales the compute resources needed for your tasks

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

EC2 Instance Profile

A

Provides permissions to the EC2 instances themselves, EC2 launch type only

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

ECS Task Role

A

Allows each task to have a specific role, defined in the task definition

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

Amazon EFS

A

Elastic file system, share data across multiple compute instances, works for EC2 and Fargate launch types

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

Can Amazon S3 be mounted as a file system for ECS?

A

No

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

ECS Auto Scaling uses AWS Application Scaling which is based on…

A
  • ECS service avg CPU utilisation
  • ECS service avg Memory utilisation
  • ALB request count per target
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Target tracking

A

Scale based on target value for specific CloudWatch metric

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

Step scaling

A

Scale based on specified CloudWatch Alarm

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

Scheduled scaling

A

Scale based on specified date/time for predictable changes

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

ECS service auto scaling is done at the ______ level whereas EC2 auto scaling is done at the ______ level

A

task, instance

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

ECS Cluster Capacity PRovider

A

Used to automatically provision and scale infrastructure for your ECS tasks (preferred)

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

ECS Rolling updates

A

When updating from v1 to v2, can control how many tasks can be started and stopped and in which order (set minimum and maximum percentage of healthy instances)

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

Dynamic Host Port Mapping

A

ALB finds the right port on your EC2 instances for you, occurs when you define only the container port in the task definition

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

Load balancing in Fargate

A

Each task has a unique private IP, only define the container port (host port is not applicable)

17
Q

Where do you define IAM role for ECS task?

A

In the task definition

18
Q

ECS Environment Variables

A

hardcoded (eg. URLs), SSM parameter store, secrets manager, or load directly from amazon s3 bucket

19
Q

ECS Data Volumes / Bind Mounts

A

Share data between multiple containers in the same Task Definition (works for EC2 and fargate tasks)

20
Q

Sidecar container pattern

A

Sidecar container is used to send metrics/logs to other destinations (needs to read from shared storage)

21
Q

Task roles

A

Allow container to make API calls to AWS services

22
Q

What is an essential container?

A

If the container fails or is killed, all tasks will be stopped

23
Q

ECS Task Placement

A

When a task of type EC2 is launched, ECS must determine where to place it with constraints of CPU, memory and available port (only for ECS with EC2, not fargate)

24
Q

Binpack Task Placement Strategy

A

Place tasks based on the least available amount of CPU or memory, minimises number of instances in use (saves money)

25
Random Task Placement Strategy
Place the task randomly
26
Spread Task Placement Strategy
Place the task evenly across specified AZs
27
ECS Task Placement Constraints
distinctInstance (place each task on a different container instance) and memberOf (places task on instances that satisfy an expression eg. t2 ec2 instance)
28
Amazon ECR (Elastic container registry)
Store and manage Docker images on AWS, fully integrated with ECS, access controlled through IAM, pull Docker images
29
AWS Copilot
CLI tool to provision required infra for containerised apps, run your apps on AWS AppRunner, ECS and Fargate
30
Amazon EKS (Amazon Elastic Kubernetes Service)
Way to launch managed Kubernetes clusters on AWS, alternative to ECS - similar goal but different API
31
EKS use case
If your company is already using Kubernetes on-premises or in another cloud and want to migrate to AWS using Kubernetes
32
EKS Managed Node Groups
Creates and manages EC2 instances for you, nodes are part of ASG managed by EKS
33
EKS Self-Managed nodes
Nodes created by you and registered to EKS cluster and managed by an ASG, can use prebuilt AMI (Amazon EKS Optimised AMI)
34
EKS Data Volumes
Need to specify StorageClass manifest on your EKS cluster, leverages Container Storage Interface (CSI) compliant dirver, supports Amazon EBS, EFS, and EFx
35
You have a Classic ECS cluster that you want to enable IAM roles for your ECS tasks so that they can make API requests to AWS services. Which ECS configuration option should you enable in /etc/ecs/ecs.config?
ECS_ENABLE_TASK_IAM_ROLE