AWS ECS, Fargate, EKS & ECR
This is part of a blog series giving a high level overview of the different services examined on the AWS Solution Architect Associate exam, to view the whole series click here.
Elastic Container Service (ECS) Summary
- Highly scalable managed container orchestration service.
- Allows you to launch, run, stop and manage containers within a cluster.
- Can be use to mange EC2 or Fargate instances.
- Defines rules for CPU and memory utilisation and allows you to specify a specific number of tasks to run simultaneously.
- Containers are launched within a VPC so can be secured with security groups and network ALCs.
- Highly available as containers can be ran across multiple Availability Zones within a region.
Container images — Contains everything you application needs to run e.g. code, runtime, libraries etc.
Task definition → Defines your application by describing one or more containers, it is in JSON format, similar concept to a Dockerfile.
Task → Single running copy of any container defined by a task definition.
Cluster → Logical collection of tasks or services.
Container agent — there is one in every container and it is used to send information about the current running tasks and current utilisation to ECS.
Container definition → used inside a task definition, describes the individual containers a task uses. Controls CPU & memory allocation
Registry → Storage for containers e.g. ECR or Docker Hub.
- Serverless compute engine for containers — works with ECS and EKS
- Provides the right sized compute capacity on demand for containers and eliminates needs to provision and manage servers.
- Secure as every individual task or pod is ran isolated in its one kernel runtime environment — they don’t share CPU, memory or storage.
- Can use CloudWatch for observability to monitor container insights.
- If your applications require broader customisation or require GPUs, Fargate might not be be option for you — as it currently does not support GPUs.
Elastic Kubernetes Service (EKS) Summary
- EKS is a managed service that allows you to run Kubernetes on AWS.
- Kubernetes is open source and lets you deploy & manage containerised applications at scale
- EKS can automatically detect and replace unhealthy instances
- EKS also provides automatic patching and version updates.
Elastic Container Registory (ECR) Summary
- Fully managed service for storing, manage and deploy container images.
- Integrates with ECS, EKS and Lambda.
- ECR also integrates with IAM which can allow resource level control of repositories.
- Pay for data storage and data transfer.