AWS Fargate Pricing: What You Need to Know

AWS Fargate Pricing is based on what you use – 

What is AWS Fargate?

AWS Fargate is a solution for Amazon ECS and EKS that allows users to run containers without managing servers or infrastructure. This allows users to have more time to focus on applications rather than the infrastructure that runs them. AWS Fargate enables more control of the resources required to run your containers beyond what is available today using traditional VMs. 

How AWS Fargate Pricing Works

With AWS Fargate, there are no upfront payments and you only pay for the resources that you use. To put it simply, you are only paying for the amount of vCPU and memory resources consumed by your containerized applications.

For the duration of your use, pricing is charged per second and has a 1-minute minimum. AWS considers the duration to be from the time you start downloading your container image until the Amazon ECS Task or Amazon EKS Pod terminates

It’s important to note that if your containers use other AWS services or transfers data, you may incur additional charges. 

Here’s an example of pricing options for US East (N. Virginia) Region:

Fargate pricing

Price
per vCPU per hour$0.04048
per GB per hour$0.004445

 

Fargate Spot Pricing for Amazon ECS

Price
per vCPU per hour$0.01243626
per GB per hour$0.00136559

 

Optimize your Fargate usage with Savings Plans

AWS has a system for getting a discount on committed usage for Fargate, called AWS Savings Plans. If you have steady Fargate usage, you should definitely be taking advantage of Savings Plans.  The key feature of the Savings Plans is that you are committing to spend a certain amount of money per hour on Fargate use. A compute savings plan, can be applied to Fargate usage regardless of instance family, size, AZ, region, OS, or tenancy.  In exchange for an amount of committed usage for 1 or 3 years, Savings Plans offer savings of up to 50% on your AWS Fargate usage.

Fargate vs. ECS vs. EKS

Functionality

ECS and EKS are Amazon’s main container service options. The biggest difference between the two lies in the management of Kubernetes. With ECS, Amazon is running Kubernetes for you, and you just decide which tasks to run and when. However, with EKS, you’re doing the Kubernetes management of your pods. You can run EKS on AWS using EC2 or Fargate.

Amazon Elastic Container Service (ECS) lets you run Docker containers without having to manage the orchestration of those containers. With ECS, you can deploy your containers on EC2 servers or in a serverless mode – this is what Amazon calls Fargate.  

While both services run EC2 servers behind the scenes, the actual network connection is slightly different. ECS has network interfaces that are connected to individual tasks on each EC2 instance, while EKS has network interfaces connecting to multiple pods on each EC2 instance. For load balancing, ECS can utilize Application Load Balancers to send traffic to a task, while EKS must use an Elastic Load Balancer to send traffic to an EC2 host

ECS is used to deploy containers that are distributed across numerous AWS VMs. Combined with AWS Fargate, ECS allows you to run containers without selecting servers. 

Pricing

The pricing structure of ECS and Fargate has the “serverless architecture” benefit of only paying for what you need when you need it. It also means that estimating these charges can be quite difficult. Pricing for ECS depends on the launch model, there are two options; the Fargate model and the EC2 model. For Fargate model, you pay for vCPU and memory that your containerized application requests. For an EC2 model, you just pay for the EC2 instances and other resources you create to store and run your application. 

You can run EKS on AWS using EC2 or Fargate.  If you choose to use EC2, you would pay for the resources you created to run your Kubernetes worker nodes – this is on-demand pricing, you’d only pay for what you use, as you use it. You pay per cluster and underlying resource. If you choose to run your EKS clusters on Fargate, it will remove the need to provision and manage servers.  With Fargate you can specify and pay for resources per application – pricing is based on the vCPU and memory resources used from the time you start to download your container image until the Amazon EKS pod terminates. Pricing is $0.10 per hour for each EKS cluster you create – you can use a single cluster to run multiple applications using Kubernetes namespaces and IAM security policies.

Here’s a closer look at the three pricing structures: 

ECS 

There are a few different pricing variables, starting with your choice of deployment methods. 

  • Standard ECS pricing charges based on the infrastructure you have deployed for your cluster NOT per-task. 
    • The cluster uses AutoScaling Groups of EC2 instances – during the setup of the cluster, you can choose the instance size and the number of instances you want for the initial cluster deployment. 
    • Since the cluster can scale up and down, you have the flexibility if you get a spike in task usage.

Fargate

Since Fargate abstracts away the underlying infrastructure, you only pay for the seconds of vCPU and Memory that your containerized application requests are using – a minimum of 1 minute for each task. This pricing structure has the “serverless architecture” benefit so you are only paying for what you need when you need it.

EKS

For each workload you run in Amazon EKS, there are two main charges that will apply.  First, there’s a charge of $0.20/hr for each EKS Control Plane you run in your AWS account. Second, you’re charged for underlying EC2 resources that are spun up by the Kubernetes controller. This second charge is very similar to how Amazon ECS charges you and is highly dependant on the size and amount of resources you need.

How to Reduce Fargate Costs

ParkMyCloud provides an easy-to-use platform that helps enterprises automatically identify and eliminate wasted cloud spend. ParkMyCloud’s SaaS offering allows organizations to easily manage, govern, and optimize their spend across multiple public clouds. 

You can use ParkMyCloud to reduce container costs by scheduling containers to turn off when not needed, including: 

  • Schedule EKS
  • Schedule AKS
  • Schedule GKE 
  • Schedule AWS Fargate (coming soon)
  • Scheduling ECS (coming soon)
  • Cluster rightsizing (coming soon)

Give it a try with a 14-day free trial. It takes about 15 minutes to get set up, and you can start optimizing your cloud spend today. 

AWS Fargate scheduling coming soon. Interested in this feature? Let us know.