<img height="1" width="1" style="display:none;" alt="LinkedIn" src="https://px.ads.linkedin.com/collect/?pid=1310905&amp;fmt=gif">

How Much Does AWS Fargate Cost?

Considering Fargate? Then, it’s important to understand the associated costs. In this guide, we discuss Fargate pricing and ways to optimize costs.

Receive a free cost architecture review. Sign up for this exclusive offer and  you'll receive a thorough review of your AWS bill and architecture with  recommendations for how you can build more efficient systems.Click here to  learn more.

Amazon Web Services (AWS) provides numerous solutions for developers. One of these is Fargate, a serverless container service that allows users to run containers on AWS without the need to manage any underlying infrastructure.

Containers are helpful because they solve the problem of getting applications to run reliably when the application is moved from one computing environment to another.

AWS Fargate works with both Amazon Elastic Container Services (ECS) and Amazon Elastic Kubernetes Service (EKS).

With Fargate, you can focus on developing your application without worrying about servers and infrastructure. You do not need to provision or manage servers — or even worry about scaling — and the containerized architecture offers better security because your applications are isolated.

If you are considering Fargate, then it’s important to understand the associated costs. In this article, we’ll discuss the Fargate pricing structure and ways to optimize costs.

Amazon Fargate Pricing: How Much Does It Cost?

There are no upfront payments with AWS Fargate. You only pay for the resources you use. AWS bills you based on the amount of vCPU and memory resources consumed by your containerized applications.

The vCPU and memory resources are calculated from the time your container images are pulled until the Amazon ECS task or EKS pod terminates. This figure is rounded up to the nearest second. However, a minimum charge of 1 minute applies.

AWS Fargate prices also vary by region, as do most other services on the platform.

For example, below is the cost of Fargate for US West (Northern California):

 

US West (Northern California)

US East (Ohio)

per vCPU per hour

$0.04656

$0.04048

per GB per hour

$0.00511

$0.004445

The complete price list for all regions is available here.

Optimizing Your Fargate Usage/Costs

While the pay-as-you-go pricing of Fargate offers many benefits, the costs can add up very quickly when you are running multiple containers. AWS offers two main ways for businesses to save on costs with Fargate.

1. AWS Savings Plans

AWS Savings Plans are similar to AWS Reserved Instances, which are billing discounts applied to running on-demand instances in your AWS account. However, unlike reserved instances, AWS Savings Plans can be applied regardless of instance type, operating system, tenancy, or region.

The commitment terms are the same, however. With a savings plan, you agree to use a specific amount of compute power (measured in $/hour) for a one- or three-year period in exchange for a heavily discounted hourly rate.

You can save up to 72% on your AWS compute usage costs with a savings plan. Percentage savings vary depending on the region, commitment term, and chosen payment option (whether you pay for the full term upfront or make a partial payment or none at all).

Below is a comparison of Compute Savings Plans for AWS Fargate for the US West (Northern California) region. Savings more than double when the commitment term is increased from one to three years.

   

Savings Plans rate

 

On-Demand Price

1-year term

All Upfront payment

3-year term

All Upfront payment

per vCPU per hour

$0.04656

$0.0363168

(22% savings)

$0.0246768

(47% savings)

per GB per hour

$0.00511

$0.0039858

(22% savings)

$0.0027083

(47% savings)

2. Fargate Spot

Using Fargate Spot is another way to save costs with AWS Fargate. The service allows you to deploy containers normally as you would with Fargate, but your containers will run on spare AWS capacity, which is offered at a cheaper rate. This allows you to save costs compared to regular Fargate containers.

The downside is that you will only get a two-minute notification whenever AWS needs the capacity back, so you should only run interruption-tolerant tasks on Fargate Spot.

Below is the AWS Fargate Spot pricing for US West (Northern California) region and the resulting savings compared to the on-demand rate.

 

On-Demand Price

Fargate Spot

Savings

per vCPU per hour

$0.04656

$0.013968

70%

per GB per hour

$0.00511

$0.001533

70%

Measuring and Optimizing Cost on AWS Fargate

Any kind of containerization, whether you’re running native Kubernetes or an Amazon service like Fargate, can make it challenging to measure cost by the metrics that matter to your business.

The CloudZero cost intelligence platform helps you measure your cost per namespace, pod, and cluster with no manual allocation rules. This enables you to understand what you’re spending and why — and align your cost with different product features. For more information on how CloudZero can help you with cost optimization on containerized infrastructure, you can learn more here.

Request a demo to see CloudZero in action and learn more about how it can help you optimize Fargate costs.

STAY IN THE LOOP


Join thousands of engineers who already receive the best AWS and cloud cost intelligence content.