Topics 58
Amazon API Gateway Amazon Athena Amazon CloudFront & Content Delivery Amazon DynamoDB Amazon ECS (Elastic Container Service) Amazon EFS (Elastic File System) Amazon EKS (Elastic Kubernetes Service) Amazon ElastiCache (Redis & Memcached) Amazon EventBridge Amazon Kinesis & Data Streaming Amazon QuickSight & Business Intelligence Amazon Redshift & Data Warehousing Amazon Route 53 & DNS Management Amazon SageMaker & Machine Learning on AWS Amazon SNS (Simple Notification Service) Amazon SQS (Simple Queue Service) Auto Scaling Groups AWS AI Services (Rekognition, Polly, Lex & Comprehend) AWS Backup & Disaster Recovery AWS Batch AWS Certificate Manager (ACM) AWS Certification Paths & Career Roadmap AWS CLI & SDKs AWS CloudTrail & Auditing AWS CodePipeline, CodeBuild & CodeDeploy (CI/CD) AWS Config AWS Cost Management & Billing AWS Database Migration Service & Application Migration AWS Direct Connect & Hybrid Connectivity AWS Elastic Beanstalk AWS Fargate AWS Free Tier & Account Setup AWS Global Infrastructure (Regions, AZs & Edge Locations) AWS Glue & ETL AWS KMS & Data Encryption AWS Organizations & Multi Account Strategy AWS Outposts & Hybrid Cloud AWS Secrets Manager & Parameter Store AWS Security Hub & GuardDuty AWS Serverless Application Model (SAM) AWS Step Functions AWS Storage Gateway AWS Systems Manager AWS Trusted Advisor AWS WAF & Shield Core Services Overview EC2 & Compute Elastic Container Registry (ECR) Elastic Load Balancing (ALB, NLB & CLB) IaC (CloudFormation) IAM Lambda & Serverless Monitoring (CloudWatch) RDS & Databases S3 & Storage Tagging Strategies & Resource Management VPC & Networking Well-Architected Framework

Amazon ECS (Elastic Container Service)

7 questions found

What is Amazon ECS and why would you use it?

Beginner
Amazon ECS, or Elastic Container Service, is a fully managed container orchestration service that lets you run, stop, and manage Docker containers on a cluster of servers without needing to install or operate your own container orchestration software, making it easier to deploy and scale containerized applications.
aws ecs create-cluster --cluster-name my-cluster
Real-world example A software company migrates its monolithic application into several smaller Docker containers and uses ECS to run and scale each container independently based on its specific resource needs.

Common follow-ups: What is the difference between ECS and EKS?;What is a container and how does it differ from a virtual machine?

Amazon EKS (Elastic Kubernetes Service);AWS Fargate

What is the difference between ECS Fargate launch type and ECS EC2 launch type?

Beginner
With the Fargate launch type, AWS manages the underlying compute infrastructure entirely, meaning you simply specify the resources your container needs and AWS runs it without you managing any servers, while the EC2 launch type requires you to provision and manage your own EC2 instances that ECS then uses to run your containers, giving you more control but also more operational responsibility.
aws ecs create-service --cluster my-cluster --service-name my-service --launch-type FARGATE
Real-world example A small team without dedicated infrastructure staff chooses the Fargate launch type to avoid managing EC2 instances, while a company with existing reserved EC2 capacity chooses the EC2 launch type to reduce cost by fully utilizing that capacity.

Common follow-ups: How does pricing differ between Fargate and EC2 launch types?;Can a single ECS cluster run both launch types together?

AWS Fargate;EC2 & Compute

What is a task definition in ECS and what does it contain?

Intermediate
A task definition is a blueprint that describes how a container should run, including which Docker image to use, how much CPU and memory to allocate, networking configuration, environment variables, and logging settings, and ECS uses this definition every time it launches a new task or scales your service up.
{
  "family": "web-app",
  "containerDefinitions": [{
    "name": "web",
    "image": "myrepo/web-app:latest",
    "memory": 512,
    "cpu": 256
  }]
}
Real-world example A development team updates a task definition to point to a new Docker image version, then deploys that updated task definition to their ECS service, which gradually replaces old running containers with new ones.

Common follow-ups: How do you update a running service to use a new task definition revision?;Can a single task definition run multiple containers together?

Elastic Container Registry (ECR);IAM

How does an ECS service maintain the desired number of running tasks?

Intermediate
An ECS service continuously monitors the number of running tasks against a desired count you specify, automatically launching replacement tasks if any fail or are stopped unexpectedly, and it can also integrate with an Application Load Balancer to distribute incoming traffic evenly across all healthy running tasks.
aws ecs update-service --cluster my-cluster --service my-service --desired-count 4
Real-world example An e commerce application configures its ECS service to always maintain four running tasks, so if one container crashes due to an unexpected error, ECS automatically starts a replacement without any manual intervention.

Common follow-ups: How does ECS decide which unhealthy task to replace first?;What is the relationship between an ECS service and a load balancer target group?

Elastic Load Balancing (ALB NLB & CLB);Auto Scaling Groups

How does networking work for containers running in ECS, particularly with the awsvpc network mode?

Intermediate
The awsvpc network mode gives each ECS task its own dedicated network interface and private IP address within your VPC, just like an EC2 instance would have, allowing you to apply security groups directly to individual tasks and giving each task full network isolation from other tasks running on the same infrastructure.
{
  "networkMode": "awsvpc",
  "containerDefinitions": [...]
}
Real-world example A financial services company uses the awsvpc network mode so that each ECS task can have its own security group rules, ensuring that only specific approved services can communicate with a task processing sensitive transaction data.

Common follow-ups: What are the other network modes available in ECS besides awsvpc?;How do security groups apply differently across each network mode?

VPC & Networking;IAM

How does ECS Service Auto Scaling work to handle varying application load?

Advanced
ECS Service Auto Scaling integrates with Application Auto Scaling to automatically adjust the number of running tasks in a service based on metrics such as average CPU utilization or the number of requests per target, so during high traffic periods more tasks are launched automatically, and during quiet periods the count scales back down to save cost.
aws application-autoscaling register-scalable-target --service-namespace ecs --resource-id service/my-cluster/my-service --scalable-dimension ecs:service:DesiredCount --min-capacity 2 --max-capacity 10
Real-world example A media streaming application configures ECS Service Auto Scaling to add more tasks automatically whenever average CPU usage exceeds seventy percent, ensuring smooth playback for users even during unexpected traffic surges.

Common follow-ups: What metrics can trigger ECS Service Auto Scaling besides CPU utilization?;How quickly does ECS Service Auto Scaling respond to a traffic spike?

Auto Scaling Groups;Monitoring (CloudWatch)

What deployment strategies does ECS support for updating running services with minimal downtime?

Advanced
ECS supports rolling updates by default, gradually replacing old tasks with new ones while maintaining a minimum healthy percentage, and it also integrates with AWS CodeDeploy to support blue green deployments, where an entirely new set of tasks is launched alongside the old ones, traffic is gradually or instantly shifted to the new version, and the old tasks are terminated only after the new version is confirmed healthy.
aws deploy create-deployment --application-name my-ecs-app --deployment-group-name my-deployment-group --revision file://appspec.yaml
Real-world example A payment processing company uses blue green deployments through CodeDeploy for its ECS service, allowing it to instantly roll back to the previous stable version if any errors are detected immediately after a new deployment goes live.

Common follow-ups: What is the difference between a rolling update and a blue green deployment?;How does CodeDeploy verify a new deployment is healthy before shifting all traffic?

AWS CodePipeline CodeBuild & CodeDeploy (CI/CD);Elastic Load Balancing (ALB NLB & CLB)