# Amazon Elastic Container Service (Amazon ECS)

Cloud service · AWS. Updated 2026-11-12. Page: https://blowstack.com/tools/cloud-services-hub/amazon-elastic-container-service-(amazon-ecs)

> Amazon Elastic Container Service (Amazon ECS) is a fully managed container orchestration service that allows you to run and scale containerized applications on AWS.

Practice exams covering Amazon Elastic Container Service (Amazon ECS): [ANS-C01 AWS Certified Advanced Networking - Specialty](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty), [CLF-C02 AWS Certified Cloud Practitioner](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner), [SOA-C03 AWS Certified CloudOps Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [AIP-C01 AWS Certified Generative AI Developer - Professional](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional), [MLA-C02 (beta) AWS Certified Machine Learning Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate), [SCS-C03 AWS Certified Security - Specialty](https://blowstack.com/practice-exams/aws-certified-security-specialty), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

## Free Amazon Elastic Container Service (Amazon ECS) tools

- [AWS VPC Connectivity Troubleshooter](https://blowstack.com/tools/aws-vpc-connectivity-troubleshooter): Find what a resource needs to reach the internet or AWS services, and fix VPC timeouts and errors.
- [EKS Max Pods Calculator](https://blowstack.com/tools/aws-eks-max-pods-calculator): See how many awsvpc tasks an instance type runs, with and without ENI trunking.

## 10 key features of Amazon Elastic Container Service (Amazon ECS)

Amazon Elastic Container Service (Amazon ECS) is a fully managed container orchestration service that allows users to deploy, manage, and scale containerized applications using Docker containers on AWS.

1. **Scalability**: Amazon ECS automatically scales your applications in response to varying load and performance requirements, ensuring efficient resource utilization.
2. **Container Orchestration**: ECS simplifies the installation and operation of containerized applications by providing automated container management, task placement, and scheduling.
3. **Integration with AWS Services**: ECS integrates seamlessly with other AWS services such as Elastic Load Balancing, Amazon VPC, and AWS IAM for enhanced functionality and security.
4. **Flexible Scheduler**: ECS features a flexible task scheduling system which supports cron-like tasks for automated scheduling and execution of container workload.
5. **High Availability**: Services running on ECS are designed for high availability, distributing your containers across multiple Availability Zones within a region for improved fault tolerance.
6. **Security**: Amazon ECS leverages AWS IAM to provide role-based permissions for containers, ensuring that resources are accessed securely.
7. **Developer Productivity Tools**: ECS supports Docker and is compatible with developer tools and workflows, making it easier to build and deploy container applications.
8. **Cost-Effective**: With AWS Fargate, Amazon EC2, or AWS Outposts, there is no ECS management fee; you pay for the underlying compute resources.
9. **Multi-Container Tasks**: An ECS task can group multiple containers that share resources such as disk volumes or networks.
10. **EC2 Cluster Auto Scaling**: Amazon ECS can manage the scaling of Amazon EC2 instances registered to your cluster.

## Where Amazon Elastic Container Service (Amazon ECS) is used

Amazon Elastic Container Service (Amazon ECS) is widely used for running containerized applications at scale, managing batch processing jobs, facilitating microservices architectures, and ensuring seamless application migration to the cloud.

1. **Microservices Management**: Amazon ECS simplifies the deployment, management and scaling of microservices. It allows developers to launch and manage containerized applications, grouped in tasks and services, ensuring that the infrastructure adapts dynamically to the application needs.
2. **Batch Processing**: ECS is ideal for batch processing jobs that require running processes in parallel at scale. Companies can efficiently manage batch workloads, schedule jobs, and scale resources as needed, optimizing both time and cost.
3. **Continuous Integration and Continuous Deployment (CI/CD)**: ECS integrates with CI/CD tools to automate the deployment pipeline. This enables developers to automatically build, test, and deploy their applications to production environments, ensuring more frequent and reliable software delivery cycles.
4. **Application Migration**: Amazon ECS supports businesses in migrating legacy applications to containerized environments. By deploying on ECS, companies can leverage the scalability and flexibility of cloud computing, while maintaining or improving their application's performance and reliability.
5. **Machine Learning Workloads**: Using ECS for machine learning tasks enables scaling and managing containerized machine learning models efficiently. ECS can handle various aspects of machine learning workflows, including data processing, model training, and inference, providing robust orchestration and management capabilities.

## How Amazon Elastic Container Service (Amazon ECS) is priced

Amazon Elastic Container Service (Amazon ECS) pricing is based on the resources you use, such as the number of Amazon Elastic Compute Cloud (EC2) instances or the AWS Fargate capacity you deploy, with no upfront fees or long-term commitments.

- **Fargate Pricing**: With the Fargate launch type, you pay for the vCPU and memory resources your containerized application requests. Usage is calculated from the time container images are pulled until the ECS task terminates, rounded up to the nearest second, with a one-minute minimum charge.
- **EC2 Pricing**: There is no additional ECS charge for the Amazon EC2 compute option. You pay for the AWS resources you create to run your application, such as EC2 instances, EBS volumes, and public IPv4 addresses.
- **ECS Anywhere Pricing**: ECS Anywhere allows you to run ECS on your own infrastructure. You are billed a flat rate per instance registered to your ECS cluster per hour, irrespective of the instance's size and operating system. This fee covers the capability to use ECS to manage containers in your own infrastructure.
- **ECS Managed Instances Pricing**: ECS Managed Instances charges a per-instance management fee in addition to standard EC2 instance charges. Both charges are billed per second with a one-minute minimum, based on instance type and duration.
- **Fargate Spot Pricing**: Fargate Spot offers interruption-tolerant ECS tasks discounts of up to 70% compared with Fargate On-Demand rates. Prices fluctuate with available capacity, and tasks can be interrupted with a two-minute warning when AWS needs capacity back.
- **Compute Savings Plans for Fargate**: Compute Savings Plans offer savings of up to 52% in exchange for a one-year or three-year hourly spend commitment, automatically applying across EC2 and Fargate usage regardless of instance family, size, operating system, tenancy, or AWS Region.
- **ECS on AWS Outposts Pricing**: ECS on AWS Outposts has no additional ECS charge; customers pay for Outposts capacity.
- **Fargate Ephemeral Storage Pricing**: Each Fargate task includes 20 GB of ephemeral storage at no additional charge; configured storage above 20 GB, up to a maximum of 200 GB, incurs an additional charge.

## Services Amazon Elastic Container Service (Amazon ECS) works with

- **[Amazon EC2](https://blowstack.com/tools/cloud-services-hub/amazon-ec2)**: Amazon ECS can launch and manage containers on Amazon EC2 instances. Users can define a cluster of EC2 instances to run containerized applications.
- **[AWS Fargate](https://blowstack.com/tools/cloud-services-hub/aws-fargate)**: AWS Fargate provides a serverless compute engine for containers. It allows users to run containers without managing the underlying infrastructure.
- **[Amazon API Gateway](https://blowstack.com/tools/cloud-services-hub/amazon-api-gateway)**: Amazon ECS services can be exposed through API Gateway HTTP APIs using private integrations. API Gateway can discover ECS task endpoints through AWS Cloud Map or route requests through a load balancer serving the ECS service.
- **[Amazon CloudWatch](https://blowstack.com/tools/cloud-services-hub/amazon-cloudwatch)**: Amazon ECS publishes service and cluster metrics to CloudWatch, and the awslogs log driver sends container output to CloudWatch Logs. Container Insights adds task- and container-level observability for troubleshooting resource usage and performance.
- **[Amazon CodeGuru](https://blowstack.com/tools/cloud-services-hub/amazon-codeguru)**: Applications in ECS tasks can use the CodeGuru Profiler agent to collect runtime profiles. These profiles help identify expensive code paths and CPU bottlenecks in containerized applications.
- **[Amazon Data Firehose](https://blowstack.com/tools/cloud-services-hub/amazon-kinesis-data-firehose)**: Amazon ECS tasks can use FireLens with AWS for Fluent Bit to send container logs to Amazon Data Firehose delivery streams. Firehose can then buffer and deliver those logs to destinations such as Amazon S3.
- **[Amazon DevOps Guru](https://blowstack.com/tools/cloud-services-hub/amazon-devops-guru)**: DevOps Guru can analyze operational metrics for ECS services to detect anomalous behavior. Its insights help investigate issues such as unusual CPU or memory utilization.
- **[Amazon EC2 Auto Scaling](https://blowstack.com/tools/cloud-services-hub/amazon-ec2-auto-scaling)**: Amazon ECS capacity providers connect clusters to EC2 Auto Scaling groups. ECS managed scaling adjusts the group's instance capacity to accommodate tasks, while managed termination protection helps prevent instances running tasks from being terminated prematurely.
- **[Amazon ECS Anywhere](https://blowstack.com/tools/cloud-services-hub/amazon-ecs-anywhere)**: ECS Anywhere extends ECS task scheduling and management to registered servers and virtual machines outside AWS. External instances run the ECS agent and Systems Manager Agent so they can participate in an ECS cluster.
- **[Amazon Elastic Block Store (Amazon EBS)](https://blowstack.com/tools/cloud-services-hub/amazon-elastic-block-store-(amazon-ebs))**: Amazon ECS can provision and attach EBS volumes to supported tasks using task volume configurations and an infrastructure IAM role. This gives containers block storage whose size, type, encryption, and initialization settings can be specified at deployment.
- **[Amazon Elastic Container Registry (Amazon ECR)](https://blowstack.com/tools/cloud-services-hub/amazon-elastic-container-registry-(amazon-ecr))**: Amazon ECS pulls container images from ECR repositories when starting tasks. Task execution roles or container instance roles authorize image retrieval, including access to private repositories.
- **[Amazon Elastic File System (Amazon EFS)](https://blowstack.com/tools/cloud-services-hub/amazon-elastic-file-system-(amazon-efs))**: Amazon ECS tasks can mount EFS file systems through task definition volume settings. Access points, IAM authorization, and encryption in transit let multiple tasks share persistent files with controlled access.
- **[Amazon EventBridge](https://blowstack.com/tools/cloud-services-hub/amazon-eventbridge)**: Amazon ECS sends task, deployment, and service events to EventBridge for event-driven automation. EventBridge rules, Scheduler schedules, and Pipes can also launch ECS tasks, supporting scheduled jobs and event-triggered processing.
- **[Amazon FSx](https://blowstack.com/tools/cloud-services-hub/amazon-fsx-(for-all-types))**: Windows tasks on ECS can mount Amazon FSx for Windows File Server file systems using task definition volume settings. This provides shared persistent SMB storage for Windows containers.
- **[Amazon GuardDuty](https://blowstack.com/tools/cloud-services-hub/amazon-guardduty)**: GuardDuty Runtime Monitoring detects suspicious activity in supported ECS workloads, including tasks running on Fargate. Its security agent observes runtime behavior such as process execution and network activity.
- **[Amazon Inspector](https://blowstack.com/tools/cloud-services-hub/amazon-inspector)**: Inspector associates vulnerable ECR images with the ECS tasks that use them. This helps prioritize image findings based on whether affected images are deployed and which tasks need replacement after remediation.
- **[Amazon Kinesis Data Streams](https://blowstack.com/tools/cloud-services-hub/amazon-kinesis-data-streams)**: Amazon ECS tasks can route container logs to Kinesis Data Streams through FireLens and the AWS for Fluent Bit Kinesis output plugin. Consumers can then process those logs as a stream.
- **[Amazon Managed Service for Prometheus](https://blowstack.com/tools/cloud-services-hub/amazon-managed-service-for-prometheus)**: Amazon ECS workloads can use an AWS Distro for OpenTelemetry collector to scrape Prometheus metrics and remotely write them to Amazon Managed Service for Prometheus. The collector can run alongside application containers in an ECS task.
- **[Amazon Managed Workflows for Apache Airflow (Amazon MWAA)](https://blowstack.com/tools/cloud-services-hub/amazon-managed-workflows-for-apache-airflow-(amazon-mwaa))**: ECS tasks can be launched and monitored from MWAA workflows using Airflow's ECS operators and sensors. A workflow can submit a containerized processing job and wait for the task to finish before continuing.
- **[Amazon OpenSearch Service](https://blowstack.com/tools/cloud-services-hub/amazon-opensearch-service)**: Amazon ECS tasks can send container logs to OpenSearch Service using FireLens and an appropriate Fluent Bit output configuration. This enables centralized indexing and searching of application logs.
- **[Amazon Q](https://blowstack.com/tools/cloud-services-hub/amazon-q)**: Amazon Q Developer operational investigations can examine ECS resources alongside related telemetry and deployment information. This helps investigate failures affecting containerized services and identify possible remediation steps.
- **[Amazon Route 53](https://blowstack.com/tools/cloud-services-hub/amazon-route-53)**: Amazon ECS service discovery can register task endpoints in AWS Cloud Map namespaces backed by Route 53 private DNS. ECS updates registrations as tasks start and stop, allowing clients to locate services by DNS name.
- **[Amazon S3](https://blowstack.com/tools/cloud-services-hub/amazon-s3)**: Amazon ECS can load container environment-variable files from S3 through task definition settings. S3 can also store ECS Exec session logs and FireLens configuration files for supported task configurations.
- **[Amazon VPC](https://blowstack.com/tools/cloud-services-hub/amazon-vpc)**: Amazon ECS tasks using awsvpc networking receive elastic network interfaces in selected VPC subnets and use security groups to control traffic. ECS services can also register task endpoints with VPC Lattice for managed application connectivity.
- **[AWS AppConfig](https://blowstack.com/tools/cloud-services-hub/aws-appconfig)**: Amazon ECS tasks can run the AWS AppConfig Agent as a sidecar container. Application containers retrieve cached configuration from the agent's local endpoint while the agent polls for deployed configuration updates.
- **[AWS Auto Scaling](https://blowstack.com/tools/cloud-services-hub/aws-auto-scaling)**: AWS Auto Scaling scaling plans can manage the desired task count of ECS services. Target-tracking policies adjust service capacity to maintain a utilization target, such as average CPU utilization.
- **[AWS Batch](https://blowstack.com/tools/cloud-services-hub/aws-batch)**: AWS Batch uses ECS to run jobs in its ECS-based compute environments on EC2 or Fargate. Batch manages job queues and scheduling while ECS runs the job containers as tasks.
- **[AWS Billing and Cost Management](https://blowstack.com/tools/cloud-services-hub/aws-billing-and-cost-management)**: Split cost allocation data attributes shared ECS compute costs to individual tasks using resource allocation and utilization information. This supports workload-level chargeback instead of treating an entire container instance as one undivided cost.
- **[AWS Cloud Map](https://blowstack.com/tools/cloud-services-hub/aws-cloud-map)**: Amazon ECS registers and deregisters service instances in Cloud Map as tasks change. ECS Service Connect also uses Cloud Map namespaces to organize service endpoints and enable communication between ECS services.
- **[AWS CloudFormation](https://blowstack.com/tools/cloud-services-hub/aws-cloudformation)**: CloudFormation provisions ECS clusters, task definitions, services, capacity providers, and related ECS resources through native resource types. ECS infrastructure and deployment configuration can therefore be versioned and updated as stacks.
- **[AWS CloudTrail](https://blowstack.com/tools/cloud-services-hub/aws-cloudtrail)**: CloudTrail records ECS API activity, including task launches, service updates, and task definition registrations. These records support auditing who changed an ECS deployment and when.
- **[AWS CodeDeploy](https://blowstack.com/tools/cloud-services-hub/aws-codedeploy)**: ECS services using the CodeDeploy deployment controller support blue/green deployments managed by CodeDeploy. Replacement task sets receive traffic through load balancer target groups, with deployment validation and rollback options.
- **[AWS CodePipeline](https://blowstack.com/tools/cloud-services-hub/aws-codepipeline)**: CodePipeline has deployment actions that update ECS services with new container images. It also supports ECS blue/green deployments through CodeDeploy using task definition and deployment specification artifacts.
- **[AWS Compute Optimizer](https://blowstack.com/tools/cloud-services-hub/aws-compute-optimizer)**: Compute Optimizer analyzes supported ECS services running on Fargate and recommends task CPU and memory configurations. Recommendations help right-size services using observed resource utilization.
- **[AWS Config](https://blowstack.com/tools/cloud-services-hub/aws-config)**: AWS Config records supported ECS resource configurations and evaluates them with managed or custom rules. Managed rules can check settings such as task definition security, logging, and service public IP assignment.
- **[AWS Cost and Usage Report](https://blowstack.com/tools/cloud-services-hub/aws-cost-and-usage-report)**: Cost and Usage Reports can include split cost allocation records for ECS tasks. These records associate task-level resource usage and allocated costs with the underlying shared compute charges.
- **[AWS Deep Learning Containers](https://blowstack.com/tools/cloud-services-hub/aws-deep-learning-containers)**: Amazon ECS can deploy AWS Deep Learning Containers as task images for machine learning workloads. These prebuilt images provide configured deep learning frameworks and dependencies, including GPU-enabled variants for suitable ECS container instances.
- **[AWS DevOps Agent](https://blowstack.com/tools/cloud-services-hub/aws-devops-agent)**: AWS DevOps Agent can investigate incidents involving ECS services by examining resource relationships, operational telemetry, and deployment changes. It uses that context to identify likely causes and propose mitigation steps.
- **[AWS Directory Service](https://blowstack.com/tools/cloud-services-hub/aws-directory-service)**: Supported ECS workloads can use group Managed Service Accounts backed by AWS Managed Microsoft AD. ECS credential specifications let containers authenticate to domain resources without embedding domain credentials in application images.
- **[AWS Distro for OpenTelemetry](https://blowstack.com/tools/cloud-services-hub/aws-distro-for-opentelemetry)**: Amazon ECS tasks can run the AWS Distro for OpenTelemetry collector as a sidecar or in other supported collector deployment patterns. It collects application metrics and traces and exports them to destinations such as CloudWatch, X-Ray, and Amazon Managed Service for Prometheus.
- **[AWS Fault Injection Service](https://blowstack.com/tools/cloud-services-hub/aws-fault-injection-simulator-(aws-fis))**: Fault Injection Service provides ECS-specific actions for stopping tasks and injecting faults into supported task workloads. Experiments can test whether an ECS service recovers from task loss or resource pressure.
- **[AWS Health Dashboard](https://blowstack.com/tools/cloud-services-hub/aws-health-dashboard)**: Amazon ECS publishes relevant maintenance and task retirement notices through AWS Health. For example, Fargate retirement events identify affected tasks so they can be replaced before scheduled maintenance.
- **[AWS Identity and Access Management (IAM)](https://blowstack.com/tools/cloud-services-hub/aws-identity-and-access-management-(iam))**: Amazon ECS uses IAM task roles to give application containers AWS permissions and task execution roles for operations such as pulling images and retrieving secrets. Service-linked and infrastructure roles authorize ECS to manage supporting resources.
- **[AWS Key Management Service (AWS KMS)](https://blowstack.com/tools/cloud-services-hub/aws-key-management-service-(aws-kms))**: Amazon ECS supports customer-managed KMS keys for features including Fargate ephemeral storage encryption and additional ECS Exec session encryption. ECS-managed EBS volumes can also use KMS encryption.
- **[AWS Lambda](https://blowstack.com/tools/cloud-services-hub/aws-lambda)**: Amazon ECS deployment lifecycle hooks can invoke Lambda functions at defined deployment stages. A hook can validate a replacement deployment or perform custom checks before ECS continues shifting traffic.
- **[AWS Local Zones](https://blowstack.com/tools/cloud-services-hub/aws-local-zones)**: Amazon ECS can place tasks on EC2 container instances in Local Zones. This lets ECS-managed applications run closer to users while their cluster remains managed from the parent Region.
- **[AWS Managed Services (AMS)](https://blowstack.com/tools/cloud-services-hub/aws-managed-services-(ams))**: AWS Managed Services can operate supported ECS environments, including monitoring and operational management of ECS clusters and their supporting infrastructure. This provides managed operations for container deployments rather than requiring customers to handle every operational task themselves.
- **[AWS Marketplace](https://blowstack.com/tools/cloud-services-hub/aws-marketplace)**: Amazon ECS can run container software distributed through AWS Marketplace. Container product deployment instructions and artifacts can supply the images and ECS configuration needed to launch purchased software.
- **[AWS Outposts](https://blowstack.com/tools/cloud-services-hub/aws-outposts)**: Amazon ECS can run tasks on EC2 container instances hosted on Outposts. The regional ECS control plane manages container workloads that need to run on premises.
- **[AWS Private Certificate Authority](https://blowstack.com/tools/cloud-services-hub/aws-private-certificate-authority)**: ECS Service Connect can use AWS Private CA to issue certificates for TLS-encrypted service-to-service traffic. ECS manages certificate provisioning and rotation for the participating Service Connect services.
- **[AWS PrivateLink](https://blowstack.com/tools/cloud-services-hub/aws-privatelink)**: ECS interface VPC endpoints provide private access to supported ECS control-plane, agent, and telemetry endpoints. EC2-backed container instances can communicate with ECS without sending that traffic through an internet gateway.
- **[AWS Resilience Hub](https://blowstack.com/tools/cloud-services-hub/aws-resilience-hub)**: Resilience Hub assesses supported ECS resources as part of an application's resilience evaluation. It provides recommendations for improving recovery objectives and preparing operational procedures and resilience tests.
- **[AWS Resource Access Manager (AWS RAM)](https://blowstack.com/tools/cloud-services-hub/aws-resource-access-manager-(aws-ram))**: ECS Service Connect can use Cloud Map namespaces shared across accounts through AWS RAM. This allows participating ECS services in different accounts to discover and communicate with one another within a shared namespace.
- **[AWS Resource Groups and Tag Editor](https://blowstack.com/tools/cloud-services-hub/aws-resource-groups-and-tag-editor)**: Supported ECS resources can be organized into tag-based resource groups and managed through Tag Editor. This helps maintain consistent ownership or environment tags across ECS resources and related infrastructure.
- **[AWS Secrets Manager](https://blowstack.com/tools/cloud-services-hub/aws-secrets-manager)**: ECS task definitions can reference Secrets Manager secrets for container environment variables, log configuration, and private registry credentials. ECS retrieves the values using the task execution role when starting a task.
- **[AWS Security Hub](https://blowstack.com/tools/cloud-services-hub/aws-security-hub)**: Security Hub evaluates ECS resources through security controls covering settings such as privileged containers, logging, and read-only root filesystems. Findings identify ECS configurations that do not meet the enabled security standards.
- **[AWS Security Token Service (AWS STS)](https://blowstack.com/tools/cloud-services-hub/aws-security-token-service-(aws-sts))**: ECS task roles provide containers with temporary AWS credentials backed by STS. ECS exposes and refreshes these credentials through its container credential endpoint so applications do not need embedded access keys.
- **[AWS Step Functions](https://blowstack.com/tools/cloud-services-hub/aws-step-functions)**: Step Functions can launch ECS tasks through its optimized ECS integration, wait for task completion, or use task tokens for callback workflows. State machines can coordinate containerized jobs with retries, error handling, and subsequent processing steps.
- **[AWS Systems Manager](https://blowstack.com/tools/cloud-services-hub/aws-systems-manager)**: ECS Exec uses Systems Manager Session Manager technology to open command sessions inside running containers. ECS also supports injecting Parameter Store values into tasks, and ECS Anywhere uses Systems Manager to register and manage external instances.
- **[AWS Trusted Advisor](https://blowstack.com/tools/cloud-services-hub/aws-trusted-advisor)**: Trusted Advisor includes ECS checks that identify selected reliability and configuration risks. Its recommendations can highlight issues such as services that lack Availability Zone redundancy.
- **[AWS User Notifications](https://blowstack.com/tools/cloud-services-hub/aws-user-notifications)**: AWS User Notifications can deliver notifications for ECS events selected through EventBridge-based notification configurations. This lets operators receive task or deployment event notifications through configured delivery channels.
- **[AWS Wavelength](https://blowstack.com/tools/cloud-services-hub/aws-wavelength)**: Amazon ECS can manage tasks on EC2 container instances deployed in Wavelength Zones. This supports containerized applications that need low-latency access to mobile network users.
- **[AWS X-Ray](https://blowstack.com/tools/cloud-services-hub/aws-x-ray)**: Applications in ECS tasks can send tracing data through an X-Ray daemon or an OpenTelemetry collector running with the workload. X-Ray then shows request traces and downstream dependencies for the containerized application.
- **[Elastic Load Balancing (ELB)](https://blowstack.com/tools/cloud-services-hub/elastic-load-balancing-(elb))**: Amazon ECS services register and deregister task endpoints with supported load balancer target groups as tasks change. Load balancer health checks and traffic routing help ECS expose healthy tasks and replace unhealthy ones.

## Amazon Elastic Container Service (Amazon ECS) exam questions

Real practice exam questions on Amazon Elastic Container Service (Amazon ECS), with the correct answer and its explanation.

### Question 1 (CLF-C02)

**Question:**

A company is deploying a containerized application on AWS. It wants a managed service to schedule containers and replace failed containers without adopting Kubernetes. Company policy also requires administrators to install security agents directly on the underlying compute instances. Which solution best meets these requirements?

**Correct answer:** Use Amazon ECS with Amazon EC2 instances.

**Explanation:** Amazon ECS provides managed container orchestration without requiring Kubernetes. Using EC2 instances for capacity allows administrators to access the hosts and install security agents.

### Question 2 (MLA-C02 (beta))

**Question:**

A retailer is deploying two CPU-based inference APIs from separate container images: a recommendation model and a fraud detection model. Requests to /recommend/* must reach only the recommendation model, and requests to /fraud/* must reach only the fraud detection model. Traffic patterns differ significantly, so each model must have its own replica count and scaling policy. The team must also be able to deploy a new version of either model without replacing replicas of the other model. The company wants managed container orchestration without managing worker instances or adopting Kubernetes.

Which deployment configuration meets these requirements?

**Correct answer:** Create a separate Amazon ECS task definition and service for each model on AWS Fargate. Give each service its own scaling policy and Application Load Balancer target group, and use path-based listener rules to route requests.

**Explanation:** Separate ECS services provide independent desired task counts, scaling policies, and deployments. Separate target groups and path-based listener rules route requests to the appropriate model. Fargate removes the need to manage worker instances.

### Question 3 (SAP-C03)

**Question:**

A company deploys an Amazon ECS service on AWS Fargate behind an Application Load Balancer by using AWS CodeDeploy blue/green deployments. The deployment group already monitors application error-rate alarms and automatically rolls back when an alarm enters ALARM. The original task set remains available throughout traffic shifting.

The company's release policy now requires production traffic to move to the replacement task set in equal increments of 20 percentage points, with 3 minutes between successive increases, until the replacement receives all production traffic. The pipeline must use managed traffic shifting without scripts that modify listener weights.

Which change should a solutions architect make?

**Correct answer:** Create a custom CodeDeploy deployment configuration for the ECS compute platform with linearPercentage set to 20 and linearInterval set to 3. Configure the deployment group to use this configuration.

**Explanation:** CodeDeploy supports custom linear deployment configurations for Amazon ECS. These settings increase the replacement task set's traffic share by 20 percentage points at 3-minute intervals. The deployment group's existing alarm monitoring and automatic rollback settings remain applicable.

### Question 4 (SOA-C03)

**Question:**

A company runs an Amazon ECS service on AWS Fargate with a desired count of four tasks. The service uses rolling deployments. Its task definition injects a password from AWS Secrets Manager into an environment variable when each container starts. The secret reference does not specify a version ID or version stage.

After the password is rotated successfully, the four running tasks still use the previous password. The application cannot reload the environment variable while running. All required permissions and network connectivity are configured, and sufficient capacity is available to launch replacement tasks.

A CloudOps engineer must replace all service tasks so that they receive the current password, maintain service availability, and finish with four service tasks. The container image and secret reference must remain unchanged.

Which action meets these requirements with the LEAST operational effort?

**Correct answer:** Call UpdateService with forceNewDeployment enabled, retaining the current task definition and desired count.

**Explanation:** A forced deployment replaces the service tasks even when the task definition has not changed. Each new task retrieves the current secret value during startup. ECS uses the service's rolling deployment configuration to replace tasks while maintaining availability and returns to the desired count of four.

### Question 5 (AIP-C01)

**Question:**

An engineering assistant uses a remote MCP server running on Amazon ECS to inspect large design bundles. A prepare_bundle tool downloads a bundle, builds a native in-memory index, and returns an opaque handle. Subsequent inspection tools use that handle to query the index. Currently, each handle identifies an index held only in the ECS task that prepared it.

During scale-out and rolling deployments, inspection calls sometimes fail because they reach a different task. The company can modify the server and tool schemas. Prepared bundles must remain usable for 24 hours, including after the preparing task terminates unexpectedly. Any healthy task must be able to process an inspection call. Reusing an existing in-memory index is desirable, but correctness must not depend on that optimization.

Which implementation BEST meets these requirements?

**Correct answer:** Persist each prepared bundle and its index-building configuration in shared durable storage. Return an opaque bundle ID backed by that durable record, and require inspection calls to include it. Each task resolves and authorizes the ID, reconstructs the index when necessary, and optionally caches the index locally.

**Explanation:** The durable record contains everything needed to reconstruct the index, so the opaque ID does not depend on a particular task surviving. Any task can serve a call by retrieving the bundle and configuration. Local index caching improves performance without becoming a correctness requirement.

### Question 6 (DEA-C01)

**Question:**

A company runs a service of long-running data-transformation workers on an Amazon ECS cluster that uses Amazon EC2 instances across three Availability Zones. Workers process independent files from a shared queue. Each task reserves substantially more memory than CPU, and memory availability limits how many tasks fit on an instance. All three Availability Zones have sufficient capacity for additional tasks.

When the service scales out, the company wants placement to prioritize distributing tasks evenly across Availability Zones for resilience. Within each Availability Zone, it wants to consolidate tasks onto fewer instances rather than distribute them across all available instances.

Which ordered ECS task placement strategy best meets these requirements?

**Correct answer:** First use spread on attribute:ecs.availability-zone, and then use binpack on memory.

**Explanation:** ECS evaluates ordered placement strategies in sequence. Spreading by Availability Zone first prioritizes balancing tasks across failure domains. Memory binpacking then favors eligible instances with the least remaining memory after placement, consolidating these memory-heavy tasks within each Availability Zone.

### Question 7 (DVA-C02)

**Question:**

A developer is configuring a CI/CD pipeline to deploy new task definition revisions to an Amazon ECS service that uses the ECS rolling deployment controller. The service has a desired count of four tasks. During planned deployments, the configuration must preserve at least four healthy tasks and permit no more than five tasks in the RUNNING or PENDING state. The cluster has sufficient capacity, and new tasks pass health checks after startup. Which deployment configuration enforces both limits while allowing the deployment to make progress without changing the desired count?

**Correct answer:** Set minimumHealthyPercent to 100 and maximumPercent to 125.

**Explanation:** With a desired count of four, these settings require at least four healthy tasks and allow at most five RUNNING or PENDING tasks. ECS can launch one replacement task, wait for it to become healthy, and then stop an old task, repeating until the deployment finishes.

### Question 8 (DOP-C02)

**Question:**

A company runs an Amazon ECS service on EC2 instances supplied by an Auto Scaling group capacity provider. Managed scaling is enabled with a target capacity of 100%. The service uses only this capacity provider. The Auto Scaling group has a desired capacity of 4 and a maximum capacity of 20. Its mixed instances policy allows m5.large instances (2 vCPUs, 8 GiB of memory) and m5.2xlarge instances (8 vCPUs, 32 GiB of memory), without instance weights.

Each task requires 4 vCPUs and 16 GiB of memory. The four existing instances are m5.2xlarge instances and have no remaining capacity for additional tasks. After the service's desired count increases, additional tasks remain in PROVISIONING. The capacity provider's CapacityProviderReservation metric remains at its target, and no scale-out activity occurs. Subnet addresses, service quotas, and instance availability are not limiting factors.

The task resource requirements cannot be reduced. A DevOps engineer must correct the configuration so that managed scaling automatically provisions capacity for these tasks.

Which change meets this requirement?

**Correct answer:** Remove m5.large from the Auto Scaling group's allowed instance types, and ensure that every remaining allowed instance type can accommodate at least one task.

**Explanation:** ECS managed scaling checks whether provisioning tasks can fit on the smallest instance type allowed by the Auto Scaling group. Tasks that cannot fit are excluded from the scale-out calculation and can remain in PROVISIONING without triggering scaling. The m5.large cannot accommodate this task. Allowing only compatible instance types removes this constraint so that managed scaling can provision the required capacity.

### Question 9 (SAA-C03)

**Question:**

A company runs a nightly license-compliance audit packaged as a Linux container image. Each audit requires 2 vCPUs and 4 GiB of memory and runs uninterrupted for 35–50 minutes. The application cannot be modified to split an audit across multiple executions. It writes its results to Amazon S3 and exits successfully when finished.

The audit must start shortly after 02:00 each day and finish within 90 minutes. The company does not want to provision or patch compute hosts and wants to avoid paying for idle compute between audits.

Which solution meets these requirements?

**Correct answer:** Use Amazon EventBridge Scheduler to launch a standalone Amazon ECS task on AWS Fargate each night. Configure the task with 2 vCPUs and 4 GiB of memory, and let it stop when the audit container exits.

**Explanation:** A standalone Fargate task can run for the audit's full duration without requiring the company to manage compute hosts. Scheduling one task per audit and allowing it to stop after completion avoids idle task compute charges between audits.

## Practice Amazon Elastic Container Service (Amazon ECS) in a full exam

Questions on Amazon Elastic Container Service (Amazon ECS) in each practice exam, with every answer option and an explanation for each:

- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 32 questions
- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 28 questions
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 21 questions
- [SOA-C03](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate): 14 questions
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 12 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 6 questions
- [MLA-C02 (beta)](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate): 4 questions
- [AIP-C01](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional): 3 questions
- [SCS-C03](https://blowstack.com/practice-exams/aws-certified-security-specialty): 2 questions
- [ANS-C01](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty): 2 questions
- [CLF-C02](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner): 1 question

## What is Amazon Elastic Container Service (Amazon ECS)

Amazon Elastic Container Service (Amazon ECS) is a highly scalable, high-performance container orchestration service that supports Docker containers and allows you to easily run and scale containerized applications on AWS. ECS can be used to launch and stop container-based applications with simple API calls, allows you to get the state of your cluster from a centralized service, and gives you access to many familiar Amazon EC2 features.

Amazon ECS eliminates the need for you to install, operate, and scale your own cluster management infrastructure. With simple API calls, you can set up and manage a distributed system of highly available container applications throughout the entire lifecycle including installation, scaling, monitoring, and management. ECS is deeply integrated with familiar features such as Amazon EC2, Amazon CloudWatch, Elastic Load Balancing, and AWS Identity and Access Management (IAM), which provides robust security without the need for you to implement your own container security system. ECS allows you to launch your applications in a secured, managed, and scalable environment. It schedules your containers across your cluster based on your resource needs and isolation policies. This provides high levels of availability and scalability by running on a diverse set of Amazon EC2 instance types and sizes.

For tasks running on EC2, the instance registration quota is 5,000 EC2 instances per cluster. This can constrain deployments using either Auto Scaling group capacity providers or self-managed instances; additional capacity can require more clusters or a quota increase.

For even more fine-grained control, Amazon ECS supports tasks definitions that allow you to specify the CPU and memory requirements, restart policies, and more for each container.

One of the key benefits of Amazon ECS is its integration with AWS Fargate, which takes the hassle out of managing servers and clusters. Instead, with Fargate, you only worry about defining your applications and their requirements. The infrastructure needed to run these applications is fully managed by AWS, which allows you to focus on designing and building your applications instead of managing the infrastructure that runs them.

Amazon ECS Managed Instances is another fully managed compute option. It automatically provisions, manages, and scales EC2 instances within your ECS cluster, including patching and lifecycle management, while keeping the instances visible in your AWS account.

Amazon ECS Managed Instances follow Amazon EC2 service quotas.

Amazon ECS Anywhere lets you register external instances, such as on-premises servers or virtual machines, with an ECS cluster.

With ECS on AWS Outposts, container instances run on Outposts EC2 capacity while the ECS control plane remains in the AWS cloud.

Amazon ECS Express Mode provides a simplified deployment experience that automatically creates and configures the ECS service, task definition, networking, load balancer, and auto-scaling, and supplies a default domain. By default, it uses AWS Fargate and an Application Load Balancer, with the resources created in your AWS account.

It supports various application architectures including microservices, batch processing, and machine learning and is versatile enough to support various application needs, from long-running applications to intermittent batch jobs. This makes ECS a highly effective platform for deploying a wide variety of applications, providing developers and IT teams the flexibility and tools they need to deliver robust, scalable applications.

## Learn Amazon Elastic Container Service (Amazon ECS) in lessons

28 short lessons on Amazon Elastic Container Service (Amazon ECS) in 9 certification courses.

- CLF-C02: Amazon ECR and Amazon ECS: image storage versus container orchestration (Premium), https://app.blowstack.com/lessons/amazon-ecr-and-amazon-ecs-image-storage-versus-container-orchestration-clf-c02
- MLA-C02 (beta): Amazon ECS: multi-container task definitions (Premium), https://app.blowstack.com/lessons/amazon-ecs-multi-container-task-definitions-mla-c02
- SAP-C03: Amazon EKS versus Amazon ECS: orchestration models (Premium), https://app.blowstack.com/lessons/amazon-eks-versus-amazon-ecs-orchestration-models-sap-c03
- SOA-C03: Amazon EKS and Amazon ECS: container orchestration models (Premium), https://app.blowstack.com/lessons/amazon-eks-and-amazon-ecs-container-orchestration-models-soa-c03
- AIP-C01: Amazon ECS: service lifecycle for containerized MCP servers (Premium), https://app.blowstack.com/lessons/amazon-ecs-service-lifecycle-for-containerized-mcp-servers-aip-c01
- DEA-C01: Amazon ECS: task resources and processing capacity (Premium), https://app.blowstack.com/lessons/amazon-ecs-task-resources-and-processing-capacity-dea-c01
