ECS: Elastic Container Service Flashcards
What is AWS’s container registry called?
Elastic Container Registry (ECR).
What structure must be provided to ECS to describe the structure of a container application?
One or many Container Definitions contained within a Task Definition. This can optionally be wrapped in a Service Definition to provide scaling and high availability.
What is the best way to give ECS containers the permissions they need to access AWS products and services?
Via a Task Role defined in the Task Definition.
What does a Container Definition provide in ECS?
The image and ports used by the container.
What does a Task Definition provide in ECS?
The security/permissions (via a Task Role), Container Definitions, and the resources the Task will consume.
What does a Task Role provide in ECS?
The IAM Role with the Task assumes to perform work it needs to do.
What does a Service Definition provide in ECS?
The number of copies of the Task to run (scaling), high availability, restarts and monitoring, etc.
What are the two ECS Cluster Modes?
EC2 mode and Fargate.
Are you billed for the EC2 instances used as part of an ECS Cluster in EC2 Mode?
Yes, these instances appear in your account and you can even connect to them. They are billed regardless of the containers running or not running on them.
Who is responsible for managing capacity and availability in ECS - EC2 Mode?
The customer.
Who is responsible for managing capacity and availability in ECS - Fargate Mode?
AWS.
What is Fargate?
An ECS shared infrastructure that runs many customers’ containers on the same hardware. Tasks are injected into a customer’s VPC by attaching them to ENI inside the VPC.
When should you use ECS?
If you use containers.
When should you use EC2 Mode for ECS?
If you have a large workload and are price conscious (i.e., you use spot pricing or reservations).
When should you use Fargate Mode for ECS?
- If you don’t want to manage the container host infrastructure.
- If you have small, burst workloads or batch, periodic workloads.