What is Amazon Fargate? - Amazon ECS
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

What is Amazon Fargate?

Amazon Fargate is a technology that you can use with Amazon ECS to run containers without having to manage servers or clusters of Amazon EC2 instances. With Fargate, you no longer have to provision, configure, or scale clusters of virtual machines to run containers. This removes the need to choose server types, decide when to scale your clusters, or optimize cluster packing.

When you run your Amazon ECS tasks and services with the Fargate launch type or a Fargate capacity provider, you package your application in containers, specify the Operating System, CPU and memory requirements, define networking and IAM policies, and launch the application. Each Fargate task has its own isolation boundary and does not share the underlying kernel, CPU resources, memory resources, or elastic network interface with another task.

For information about Fargate architecture, see Using the Fargate launch type in the Amazon Elastic Container Service Developer Guide

This topic describes the different components of Fargate tasks and services, and calls out special considerations for using Fargate with Amazon ECS.

Components

Clusters

An Amazon ECS cluster is a logical grouping of tasks or services. You can use clusters to isolate your applications. When your tasks are run on Fargate, your cluster resources are also managed by Fargate.

Task definitions

A task definition is a text file that describes one or more containers that form your application. It's in JSON format. You can use it to describe up to a maximum of ten containers. The task definition functions as a blueprint for your application. It specifies the various parameters for your application. For example, you can use it to specify parameters for the operating system, which containers to use, which ports to open for your application, and what data volumes to use with the containers in the task. The specific parameters available for your task definition depend on the needs of your specific application.

Your entire application stack doesn't need to be on a single task definition. In fact, we recommend spanning your application across multiple task definitions. You can do this by combining related containers into their own task definitions, each representing a single component.

Tasks

A task is the instantiation of a task definition within a cluster. After you create a task definition for your application within Amazon ECS, you can specify the number of tasks to run on your cluster. You can run a standalone task, or you can run a task as part of a service.

Services

You can use an Amazon ECS service to run and maintain your desired number of tasks simultaneously in an Amazon ECS cluster. How it works is that, if any of your tasks fail or stop for any reason, the Amazon ECS service scheduler launches another instance based on your task definition. It does this to replace it and thereby maintain your desired number of tasks in the service.

Operating System and CPU architecture

The following operating systems are supported:

  • Amazon Linux 2

  • Windows Server 2019 Full

  • Windows Server 2019 Core

  • Windows Server 2022 Full

  • Windows Server 2022 Core

If you use Windows containers on Fargate, review Windows containers on Amazon Fargate considerations.

There are 2 architectures available for the Amazon ECS task definition, ARM and X86_64.

When you run Windows containers on Fargate, you must have an X86_64 CPU architecture.

When you run Linux containers on Fargate, you can use the X86_64 CPU architecture, or the ARM64 architecture for your ARM-based applications. For more information, see Working with 64-bit ARM workloads on Amazon ECS.

Regions

For information about the Regions that support Linux containers on Fargate, see Supported Regions for Linux containers on Amazon Fargate.

For information about the Regions that support Windows containers on Fargate, see Supported Regions for Windows containers on Amazon Fargate.

Windows containers on Amazon Fargate considerations

Windows containers on Amazon Fargate supports the following operating systems:

  • Windows Server 2019 Full

  • Windows Server 2019 Core

  • Windows Server 2022 Full

  • Windows Server 2022 Core

Amazon handles the operating system license management, so you do not need any additional Microsoft Windows Server licenses.

Windows containers on Amazon Fargate supports the awslogs driver. For more information, see Using the awslogs log driver.

Your tasks can run either Linux containers or Windows containers. If you need run both container types, you must create separate tasks.

The following features are not supported on Windows containers on Fargate:

  • Group managed service accounts (gMSA)

  • Amazon FSx

  • ENI trunking

  • App Mesh service and proxy integration for tasks

  • Firelens log router integration for tasks

  • EFS volumes

  • The following task definition parameters:

    • maxSwap

    • swappiness

  • The Fargate Spot capacity provider

  • Image volumes

    The Dockerfile volume option is ignored. Instead, use bind mounts in your task definition. For more information, see Bind mounts.

Getting started walkthroughs

The following walkthroughs help you get started using Amazon ECS on Fargate.

For more information about Amazon Elastic Container Service, see What is Amazon ECS?.

Pricing

With Amazon ECS on Amazon Fargate, you pay for the vCPU and memory resources your tasks use. For more information, see Fargate Pricing.

Fargate also offers Savings Plans which provides significant savings on your Amazon usage. For more information, see the Savings Plans User Guide.

To see your bill, go to the Billing and Cost Management Dashboard in the Amazon Billing and Cost Management console. Your bill contains links to usage reports that provide details about your bill. To learn more about Amazon account billing, see Amazon Account Billing.

If you have questions concerning Amazon billing, accounts, and events, contact Amazon Web Services Support.

For an overview of Trusted Advisor, a service that helps you optimize the costs, security, and performance of your Amazon environment, see Amazon Trusted Advisor.