What is a container and how does it differ from a virtual machine?
A container packages an application with its dependencies and runs on a shared OS.
VM:
* Includes full OS
* Heavier
Container:
* Lightweight
* Faster startup
* Shares host OS
Why are containers more efficient than virtual machines?
Because they share the host OS, reducing overhead and improving performance.
What is Amazon ECS?
Elastic Container Service is a managed container orchestration service used to run and manage containers.
What is container orchestration?
Managing deployment, scaling, networking, and lifecycle of containers automatically.
What are the key components of ECS architecture?
What is a task definition in ECS?
A blueprint that defines:
* Container image
* CPU/memory
* Ports
* Environment variables
What is a task in ECS?
A running instance of a task definition.
What is a service in ECS?
A component that ensures a specified number of tasks are running continuously.
What is an ECS cluster?
A logical group of resources (EC2 or Fargate) where containers run.
What is Amazon ECR?
Elastic Container Registry — a Docker image storage repository.
Why is ECR important in container workflows?
It stores container images so ECS can pull and run them.
Describe the flow of running a container using ECS.
Build container image
Push to ECR
Create task definition
Run task/service in ECS
ECS pulls image and runs container
What are the two launch types in ECS?
What is ECS EC2 launch type?
You manage EC2 instances that run containers.
What is ECS Fargate launch type?
Serverless container execution where AWS manages infrastructure.
Compare EC2 launch type vs Fargate.
EC2:
* More control
* Requires management
Fargate:
* No server management
* Easier but less control
Why would a company choose Fargate over EC2?
To avoid managing servers and focus only on running containers.
What is a key benefit of EC2 launch type over Fargate?
Greater control over infrastructure and cost optimisation.
What is container scaling and how does ECS support it?
Increasing/decreasing number of running containers.
ECS supports scaling via:
* Services
* Auto Scaling
What is load balancing in ECS?
Distributing traffic across multiple containers for performance and reliability.
How does ECS achieve high availability?
By running containers across:
* Multiple instances
* Multiple Availability Zones
What is the role of networking in ECS?
To allow containers to communicate internally and externally.
Why is container portability important?
Containers can run anywhere consistently (dev, test, production).
What is a Docker image?
A packaged file containing application code + dependencies used to create containers.