All technological notes.
Amazon ECSECS = Elastic Container ServiceEC2 Launch Type:
ECS Agent to register in the ECS Cluster
You do not provision the infrastructure (no EC2 instances to manage)

AWS Fargate allows you to run your containers on AWS without managing any servers.EC2 Instance Profile Role (EC2 Launch Type only):
ECS agentCloudWatch LogsECRSecrets Manager or SSM Parameter StoreECS Task Role: (Both for EC2 type and Fargate type)
ECS Task Role is the IAM Role used by the ECS task itself. Use when your container wants to call other AWS services like S3, SQS, etc.

To expose task as http/https endpoint.
Classic Load Balancer supported but not recommended (no advanced features – no Fargate)Application Load Balancer supported and works for most use casesNetwork Load Balancer recommended only for high throughput / high performance use cases, or to pair it with AWS Private Link
EFS volume can be shared between different EC2 instances and different ECS Tasks.
Mount EFS file systems onto ECS tasks
EC2 and Fargate launch typesFargate + EFS = ServerlessNote:
S3 cannot be mounted as a file systemUse cases:

Automatically increase/decrease the desired number of ECS tasks
Amazon ECS Auto Scaling uses AWS Application Auto Scaling with 3 metrics:
Types of Auto Scaling:
Target Tracking
CloudWatch metricStep Scaling
CloudWatch AlarmScheduled Scaling
ECS Service Auto Scaling (task level) ≠ EC2 Auto Scaling (EC2 instance level)
Fargate Auto Scaling is much easier to setup (because Serverless)
Accommodate ECS Service Scaling by adding underlying EC2 Instances
Ways to auto scaling EC2 instacnes:
Auto Scaling Group Scaling
ECS Cluster Capacity Provider: a recommandated feature
Auto Scaling Group

































Amazon ECRECR = Elastic Container Registry
S3IAM (permission errors => policy)