AWS Fargate and Managed Containerisation

What is Fargate?

Fargate is a serverless compute engine that lets you deploy and manage apps, APIs, and microservices without the need to manage the underlying infrastructure. It also optimizes costs by only paying for the resources used.

With Fargate, you simply package your app into containers, define Memory/CPU configuration and IAM policies, and run the application. Fargate makes scaling simple and easy. It works with Amazon Elastic Kubernetes Service (EKS) and Amazon Elastic Container Service (ECS).

Fargate Architecture

Fargate Architecture

Why Bother about Fargate Pricing?

Why bother about AWS Fargate pricing when it is a fully-managed serverless offering? You should!

  • Because AWS handles the hardware of the container platform and not the container/pod size.
  • Because AWS automatically scales the number of containers/pods and not their sizes.
  • Because striking a balance between cost and performance is important, using the right-sized containers for the right tasks.
  • Because the application’s resource footprint, web server, computing platform, and libraries determine the right size of the containers/pods.

AWS Fargate Pricing: Real Costs and Pricing Structure

AWS does not charge any upfront costs for Fargate. You only need to pay for the resources used.

Primarily, Fargate pricing is based on the requested vCPU and memory capacities. However, other dimensions affect this price.

Fargate pricing is based on five independently configurable dimensions:

  1. vCPU
  2. Memory
  3. Operating System
  4. CPU Architecture
  5. System Resources

Fargate Storage

Each ECS task hosted on the Fargate platform comes with a default ephemeral storage of 20 GiB. If a task needs additional storage, you can purchase ephemeral storage for up to 200 GiB per task.

While the first 20 GiB ephemeral storage is free, every GiB after that value is charged based on the AWS region. For instance, AWS charges $0.000111 per GB per hour for Fargate ephemeral storage in the US East Ohio region. If a task uses 30 GB of ephemeral storage, only 10 GB is chargeable.

In most use cases Fargate is cheaper than managing the underlying infrastructure and related processes using ECS.

Pricing comparison with ECS here