Elastic Container Service (ECS) is a fully managed solution for containerized application management. It lets you easily run your applications on Amazon Elastic Compute Cloud (Amazon EC2) instances, or via Amazon Fargate, in a single, managed cluster.
Key capabilities of Amazon ECS include:
In this article
You can specify an Amazon ECS launch type when running individual tasks or creating services. This determines the infrastructure for hosting jobs and services. The available launch types are:
AWS Fargate is a serverless way to host Amazon ECS workloads. You can run containerized applications using the Fargate launch type without provisioning and managing the underlying infrastructure.
The following figure shows a typical architecture.
As a container orchestration, ECS makes many aspects of containers and cluster management easier, but not everything. You can use the EC2 launch type to register your Amazon ECS clusters and run containerized applications on Amazon EC2 instances that you manage yourself. When you choose to use the EC2 launch type, you maintain control over your infrastructure but are required to provision, scale, and monitor EC2 instances.
The following figure shows a typical architecture.
Image source: AWS
Learn more in our detailed guide to AWS ECS architecture (coming soon)
Elastic Container Service (ECS) Anywhere is an Amazon ECS feature that makes it easier to run and manage container workloads on customer managed infrastructure.
ECS Anywhere extends Amazon ECS’s simplicity to the on-premise data center. It provides a consistent API and tooling experience for container-based applications—whether in the cloud or on-premises, they provide the same cluster monitoring, management, and workload scheduling as Amazon ECS.
Learn more in our detailed guide to AWS ECS anywhere (coming soon)
Amazon ECS is designed to run infrastructure in an efficient, automated, and scalable way. There is no additional charge for Amazon ECS. You pay only for the AWS resources you create to store and run your applications. There are no minimum fees or upfront obligations.
There are no additional charges to get your containers up and running with Amazon Elastic Compute Cloud (EC2) and ECS. You pay only for the resources used to run the applications—for example, the underlying EBS storage volumes and EC2 instances. For more information and pricing information on Amazon EC2 instances, please visit the EC2 pricing page.
While there are no upfront or minimum fees, EC2 deployment has some drawbacks. When deploying ECS containers on EC2 instances, you must define which instance type to use and when to scale up. Customers are responsible for configuring, monitoring, maintaining, patching, and securing their underlying EC2 instances.
Also, instance size is fixed. Therefore, you need to be confident about your container requirements in advance and avoid choosing instances that are too large or too small.
Advantages of ECS with EC2 include greater control to tailor the infrastructure to your specific requirements, such as choosing between GPU-optimized or network-optimized instances.
Learn more in our detailed guides to:
AWS Fargate charges for the compute and memory resources used by containerized applications. However, the price is slightly higher than Amazon EC2. This is because with Fargate, Amazon does the heavy lifting of configuring and managing underlying infrastructure and servers. Note that you can run Fargate on spot instances, which can reduce the cost by up to 90%, but this carries the risk of having workloads interrupted at short notice.
Fargate charges are calculated on container images pulled by ECS tasks, rounded up to the closest second. The minimum charging time is 1 minute. Fargate charges are based on:
Fargate charges a higher price compared to EC2, but allows you to focus on building and managing applications. You simply provide the resources your task needs, and Fargate starts the container. Additionally, each application is isolated by design, which improves security.
AWS Outposts are fully managed services that extend AWS infrastructure, APIs, services, and tools to customer premises. It allows organizations to develop and run applications on-premises or on hybrid infrastructure.
Amazon ECS on AWS Outposts has simple pricing and works just like it does on the cloud. The Amazon ECS control plane runs in the cloud (not on Outposts) while container instances run on Outposts EC2 capacity at no extra charge.
If your use case requires data to be kept locally or your application has stringent low-latency requirements, you can host the ECS containers on Outposts. This can be more expensive than other compute options, but is suitable for certain workloads.
Please see the Outposts pricing page for further pricing details.
There is no upfront or minimum fee for ECS Anywhere—you pay for any running instances you manage. AWS charges $0.01025 per hour per ECS Anywhere instance on-premises.
On-premise instances are managed by the customer, but are registered with the ECS cluster and run on the ECS container agent. See the Amazon ECS Anywhere pricing page for details.
For all the benefits that AWS ECS brings to developing and running containers, these distributed applications still need observability to ensure they run at the highest performance, with the greatest reliability to deliver seamless customer experiences.
Lumigo is a cloud native observability platform purpose-built for microservice applications that provides deep visibility into applications and infrastructure, enabling users to easily monitor and troubleshoot their applications running on Amazon ECS.