Table Of Contents
What Does Amazon ECS Do? Amazon ECS Pricing Explained How Does ECS Billing Work? How To Estimate Amazon ECS Costs Common Amazon EC2 Pitfalls To Avoid Amazon ECS Cost Optimization: How To View, Control, And Optimize Your ECS Costs Amazon ECS FAQs

With containerization, you can write an application once and run it anywhere. Along with portability, containers are also much more resource-efficient than traditional virtual machines (VMs). However, managing containers at scale can be challenging.

Besides, many teams find container orchestration platforms like Kubernetes overkill and too complex.

Amazon Elastic Container Service (Amazon ECS) provides a managed container platform, offering an alternative to building, configuring, and managing your own containerization infrastructure.

But is ECS pricing worth it? This Amazon ECS pricing guide will answer that question and cover ECS pricing in detail.

What Does Amazon ECS Do?

Amazon ECS delivers a managed container orchestration service within the Amazon Web Services (AWS) public cloud. You can run thousands of containers with your favorite Continuous Integration and Continuous Delivery (CI/CD) tools securely and scalably.

You can also integrate ECS with AWS Fargate serverless computing. This eliminates the need to configure and manage control planes, instances, and nodes yourself.

AWS ECS

AWS promises to save you up to 50% on compute costs by utilizing autonomous scaling, provisioning, and usage-based pricing. AWS ECS Anywhere also lets you build, deploy, and orchestrate container-based applications on-premises and in the cloud.

In addition, ECS provides access to the performance, scalability, and availability of the AWS public cloud, including Amazon EC2 instances, Spot pricing, and serverless computing via AWS Fargate.

Here’s how ECS prices these capabilities to help you understand what you’re paying for and how to optimize it.

The Cloud Cost Playbook

Amazon ECS Pricing Explained

Amazon ECS lets you pay for the resources you create to run your application. Those resources include Amazon Elastic Compute Cloud (Amazon EC2) instances, Amazon Elastic Block Store (Amazon EBS), etc.

You won’t pay anything extra for ECS beyond what you’d pay for EC2 instances, Fargate vCPUs, EBS storage volumes, data transfers outside AWS, etc.

ECS also enables you to pay for what you use while you use it. The service does not require signing a minimum usage contract, paying upfront fees, or providing resources. It’s a pay-as-you-go pricing model.

So, how does Amazon ECS billing really work? Well, here’s how ECS calculates your bill.

How Does ECS Billing Work?

Amazon ECS billing follows two models:

  • Amazon EC2 launch type pricing: Launch and run Docker containers with Amazon EC2 instances on Amazon ECS.
  • AWS Fargate launch type pricing: Launch and run containerized applications using this fully managed, serverless option.

However, the two charge models apply to four use cases: Amazon EC2 launch type, AWS Fargate launch type, Amazon ECS on AWS Outposts (on-premises), and Amazon ECS Anywhere (hybrid cloud). Here’s how it works.

1. Pricing for Amazon EC2 launch type

You won’t pay extra for deploying and running containers with EC2 instances. Your only cost is for the underlying EC2 instances and Amazon EBS storage volumes you need to run your application.

In addition, this launch type enables you to choose from five types of EC2 instances:

  • On-Demand Instance pricing – These instances are available as needed and are ideal for workloads with unpredictable resource utilization. Depending on your instance types, on-Demand pricing is per hour or second (general purpose, memory-optimized, compute-optimized, accelerated computing, or storage-optimized).
  • Reserved Instance pricingis a discount off the standard, On-Demand pricing for using a consistent resource capacity for up to three years. Reserved instances (RIs) are ideal for steady and predictable usage. Pricing is in dollars per hour.
  • Spot Instance pricing – AWS’s surplus compute capacity is discounted (up to 90% off the On-Demand rate) for these EC2 instances, but they are only suitable for temporary usage.
  • Savings Plans pricing – Like RIs, SPs offer discounted per-hour billing rates for committing to use a specific resource capacity over the course of one or three years. Pricing is measured in dollars per hour.
  • Dedicated Host pricing – This option refers to charges for a physical Amazon EC2 server that is private to you. It also enables you to use your existing licenses, including SUSE Linux Enterprise Server, Windows Server, and SQL Server. Pricing is either per hour (On-Demand) or Reserved (up to 70% off the On-Demand rate with commitment).

Here are some things to keep in mind when using Amazon ECS with Amazon EC2:

  • You have control over the type and size of instances to use.
  • You have deep access to the infrastructure for further customizations.
  • You are responsible for provisioning, monitoring, maintaining, and securing the infrastructure.
  • EC2 instances have a fixed capacity, so ensure you understand your application’s resource consumption requirements to configure the most optimal instance types and sizes from the start.
  • You pay for EC2 instances for as long as they run, so idle instances may unnecessarily increase costs until you terminate them.
CloudZero Advisor

Whether configuring your EC2 or ECS environment for optimal performance or cost savings, CloudZero Advisor can help you compare instance types, sizes, and prices. It provides insights based on AWS services, resource types, AWS regions, pricing, and instance types. Visit CloudZero Advisor to learn more.

A similar pricing model applies to AWS Outposts.

2. Pricing for Amazon ECS on AWS Outposts

AWS Outposts is a fully managed service that enables you to leverage AWS cloud infrastructure, APIs, services, and tools in your on-premises setup. You can launch your EC2 instances and manage applications on AWS Outposts through the AWS console, Command-Line Interface, or SDK, just as you would in the public cloud.

Note that the ECS control plane is in the cloud — not on Outposts.

You also pay for the EC2 instance types, Amazon S3 usage, and Amazon EBS gp2 volume you use to run container instances.

The actual charges you’ll pay depend on the specific AWS Outposts configuration option you choose, which pools resources together, including EC2 instances, EBS volumes, and Amazon S3. That pricing includes the cost of installation, upgrades, delivery, infrastructure service maintenance, and software patches.

One more thing. There are three payment options available when purchasing Outposts rack capacity over three years:

  • All Upfront – Pay in full, in advance, to get the best price
  • Partial Upfront – You can pay 50% upfront and the remainder monthly throughout the plan
  • No Upfront – Pay nothing upfront and the rest monthly

Your Outposts rack capacity will become available for launching instances 24 hours after installation. That’s when any monthly or upfront charges begin to apply.

You can find the most up-to-date AWS Outposts rack pricing here and AWS Outposts servers pricing here.

3. Pricing for Amazon ECS Anywhere

With this option, you can launch and deploy containerized applications on your own infrastructure (on-premises) using an in-region ECS control plane. ECS Anywhere is an extension of Amazon ECS that’s ideal for you if you already have significant investments in your data center and specific compliance or regulatory obligations that require you to own and operate your infrastructure.

Amazon ECS

With Amazon ECS Anywhere, workload scheduling, cluster management, and monitoring work the same way in the AWS cloud and on your own infrastructure (on-premises).

There are no upfront commitments or minimum fees required. You only pay for running instances that ECS Anywhere manages. Pricing is $0.01025 per hour for every managed ECS Anywhere on-premises instance. Each of these instances is self-managed and needs to be registered as part of an Amazon ECS cluster and running the Amazon ECS container agent.

ECS Anywhere billing is based on the duration that the instance you register to an Amazon ECS cluster is connected to the ECS control plane, calculated to the nearest second. Deregistering, shutting down, or terminating an on-premises instance stops the billing.

Oh, and you will also have to pay for the AWS Systems Manager Agent (SSM Agent). Amazon ECS Anywhere requires it to verify and register your on-premises instances. You may need to pay up, more so when you have over 1,000 instances per account per region at any given time.

How does launching ECS containers with AWS Fargate compare?

4. Pricing for AWS Fargate launch type

You won’t have to pay anything upfront here. You only pay for the amount of virtual CPU, RAM, and storage capacity that your containerized applications use when running on the Amazon Elastic Container Service (ECS).

AWS Fargate calculates your costs from the time you start to download a Docker container image until you complete the ECS task, rounded off to the nearest second. There’s also a one-minute minimum requirement (15 minutes for Windows).

Specifically, pricing for ECS with AWS Fargate depends on the following configurable components:

  • vCPU – Pricing is per vCPU per hour
  • Memory – Pricing is per Gigabyte (GB) per hour
  • Storage – You get a complimentary 20GB of temporary storage by default, with additional storage capacity costing from $0.000111 per storage GB/hour
  • Operating system and CPU architecture – Pricing starts at $0.04048 per vCPU/hour and $0.004445 per GB/hour for Linux/x86; $0.03238 per vCPU/hour and $0.00356 per GB/hour for Linux/ARM; $0.09148 per vCPU/hour and $0.01005 per GB/hour with $0.046 OS license fee (per vCPU/hour) for Windows/X86
  • AWS Region – There are 22 available regions across the globe
  • Data transfers – You pay for data transfers or when your containers use other AWS services. For example, if your containers use Amazon CloudWatch Logs to perform application logging, you’ll pay to use CloudWatch. If you transfer data from AWS to the internet, charges start from $0.09 per GB after the first 100 GB free (which applies across all AWS services associated with your account).

Note that you can use Spot instances and Savings Plans with AWS Fargate.

Fargate Spot pricing for Amazon ECS can get you up to 70% off the regular On-Demand rate (starts at $0.012144 per vCPU/hour and $0.0013335 per GB of RAM/hour in the US East (Ohio) region), provided you use a Linux OS and X86 CPU architecture.

Savings Plans for Amazon ECS Compute offer discounts of up to 50% on AWS Fargate usage if you commit to using a certain amount of compute (measured in dollars per hour) for one or three years.

Pricing for the AWS Fargate Launch type is costlier per hour than the Amazon EC2 Launch type. However, the AWS Fargate Launch type requires less management than the EC2 Launch type and automatically shuts down an ECS task when completed so that an idle task does not accrue further costs.

How To Estimate Amazon ECS Costs

The AWS Pricing Calculator helps you calculate AWS ECS costs based on your specific configurations. Here’s how to use it:

Select your launch type

Choose whether you’ll use Amazon EC2 instances, AWS Fargate, or a hybrid setup like AWS Outposts or ECS Anywhere. Each launch type has a different cost structure.

Input resource needs

For EC2 deployments, enter instance types, sizes, and runtime (On-Demand, Reserved, or Spot instances). For Fargate, input the required number of vCPUs, memory, and storage. The Pricing Calculator provides hourly or monthly costs based on these inputs.

Add data transfer costs

Estimate data transfer costs for moving data between AWS regions or to the internet. The calculator will include these in your estimate.

Include storage requirements

Estimate storage needs for Amazon EBS or Fargate’s ephemeral storage. Costs will depend on the storage type and size.

Factor in additional services

Include the costs of services like Amazon CloudWatch or AWS Systems Manager. The Pricing Calculator accounts for all these services.

Common Amazon EC2 Pitfalls To Avoid

When using EC2 instances in Amazon ECS, avoid these common mistakes:

  • Overprovisioning resources. Allocating too much CPU, memory, or storage leads to idle resources and higher costs. Monitor usage closely with tools like AWS Cost Explorer and CloudZero to optimize.
  • Spot Instance interruptions. Spot instances can save costs but risk interruptions. Ensure your application can handle this, or combine Spot with Reserved or On-Demand instances for critical tasks.
  • Missed Savings Plans or Reserved Instances. If your usage is predictable, committing to Savings Plans or Reserved Instances offers significant discounts over On-Demand.
  • Leaving unused instances running. Avoid costs by shutting down or terminating idle instances. Auto-scaling and automated shutdown scripts help manage this.
  • Underestimating data transfer costs. Data transfers, especially between regions or out to the Internet can add up fast. Plan ahead to avoid unexpected costs.

Amazon ECS Cost Optimization: How To View, Control, And Optimize Your ECS Costs

Containerization can improve your applications’ portability, scalability, resilience, and resource efficiency. However, containers’ distributed nature and high scalability can create cost blindspots.

If cost efficiency is important to your Docker container system on AWS (Amazon ECS), CloudZero offers you the tools you need to understand why, what, and who is driving your Amazon ECS costs.

CloudZero empowers you to:

  • Seamlessly measure the cost of goods sold (COGS) across containerized infrastructure.
  • View Amazon ECS costs per customer, product, feature, environment, deployment, etc.
  • View how much it costs you to run a container or microservice.
  • Combine containerized and non-containerized costs for easier analysis.
  • Track idle resources so you can optimize your infrastructure.
  • Use CloudZero Advisor to pick the right EC2 instance types and sizes for your launch type, including Outposts and ECS Anywhere.
  • Get noise-free cost anomaly alerts right in your Slack, email, or favorite incident reporting tool to prevent overspending.

to see how it all works!

Amazon ECS FAQs

Here are answers to some frequently asked questions about Amazon ECS pricing.

What is the Amazon ECS pricing model?

You pay for only what you use for Amazon ECS.

Do you pay a separate fee for using Amazon ECS on AWS?

No. There are no additional fees. Instead, you pay for the resources you use to launch and run your containerized applications, such as Amazon EBS volumes, EC2 instances, and Amazon S3 buckets.

What is the difference between the AWS Fargate and the Amazon EC2 launch types?

Both ways to launch and run containers on Amazon ECS are fully managed. However, the AWS Fargate launch type is serverless and requires minimal self-management once you configure your instances. By contrast, the EC2 launch type is mainly self-managed, except for container orchestration, which AWS handles.

What is the difference between AWS Outposts and Amazon ECS Anywhere?

AWS Outposts enables you to use fully managed AWS infrastructure, APIs, services, and tools for virtually any on-premises data center, hybrid cloud, or edge computing strategy. The difference is that ECS Anywhere uses an in-region Amazon ECS control plane and streamlines software and compliance management.on Amazon ECS control plane and streamlines software and compliance management.

The Cloud Cost Playbook

The step-by-step guide to cost maturity

The Cloud Cost Playbook cover