AWS Fargate
Cloud service · AWS · Updated

AWS Fargate

In short

AWS Fargate is a serverless compute engine for containers that allows you to run containers without having to manage servers or clusters.

Cloud Services Hub →

7 key features of AWS Fargate

AWS Fargate is a serverless compute engine for containers that offers seamless scaling, integration with ECS and EKS, and ensures secure, isolated environments without over-provisioning, alongside easy monitoring and logging capabilities.

01
Serverless Compute for Containers

AWS Fargate removes the need to provision and manage servers, letting you specify and pay for resources per application.

02
Seamless Scaling

Amazon ECS and Amazon EKS schedule containers onto Fargate, providing automatic scaling, load balancing, and container availability through managed scheduling.

03
Integrated with Amazon ECS and EKS

Fargate seamlessly integrates with Amazon Elastic Container Service (ECS) and Elastic Kubernetes Service (EKS), simplifying the deployment, management, and scalability of containers using these services.

04
Security and Isolation

Each task or pod runs in its own isolated environment, improving security and reducing the risk of interference from other tasks or pods.

05
Configurable Resource Requests

Configure resource requests for each task or pod; billing is based on requested resources, not solely on actual CPU and memory utilization.

06
Easy Monitoring and Logging

Integrates with AWS CloudWatch, allowing you to monitor and log the performance and health of your applications easily.

07
Mixed-Architecture AWS Batch Jobs

AWS Batch on Fargate can run x86 and Arm64 jobs through a single compute environment and job queue, with the architecture selected per job definition. This support requires AWS Batch compute environments using Amazon ECS, not Amazon EKS.

Where AWS Fargate is used

AWS Fargate is utilized for serverless deployment of microservices, batch processing, streamlining CI/CD pipelines, handling event-driven applications, and running machine learning inference, providing an auto-scaling and resource-optimized environment.

  1. 01
    Microservices Deployment

    AWS Fargate facilitates the deployment of microservices without the need to manage servers or clusters, allowing developers to focus on building and scaling applications.

  2. 02
    Batch Processing

    Leveraging AWS Fargate, users can run batch processing jobs as containers, which can start quickly and scale automatically, optimizing both time and resources.

  3. 03
    Continuous Integration/Continuous Deployment (CI/CD) Pipelines

    Fargate integrates with CI/CD pipelines, providing a seamless way to build, test, and deploy applications rapidly and securely without managing underlying infrastructure.

  4. 04
    Event-driven Applications

    By using AWS Fargate with services like Amazon EventBridge or S3, developers can create event-driven applications that automatically scale in response to triggers.

  5. 05
    Machine Learning Model Inference

    Fargate is suitable for deploying machine learning models as containers, offering a serverless environment that scales on-demand for inference workloads.

How AWS Fargate is priced

AWS Fargate pricing includes On-Demand, where you pay for compute resources used, and Spot, which offers discounts but can be interrupted.

Fargate On-Demand

Pay for requested vCPU, memory, operating system, CPU architecture, and storage resources with no upfront costs. Billing runs from the start of the container image download until task or pod termination, rounded up to the nearest second, with a one-minute minimum for Linux containers and a five-minute minimum for Windows containers.

Fargate Spot

This model offers a discounted rate compared to On-Demand pricing by utilizing spare computing capacity. However, these instances can be interrupted by AWS with two minutes of notification when AWS needs the capacity back, making this option suitable for fault-tolerant and flexible applications.

Compute Savings Plans

Save up to 50% on Fargate usage by committing to a specific amount of compute spending, measured in dollars per hour, for a one- or three-year term.

Ephemeral Storage

Tasks and pods include 20 GB of ephemeral storage by default; additional configured storage is charged per GB-hour.

Services AWS Fargate works with

Amazon API GatewayAmazon API Gateway

AWS Fargate services can be exposed through API Gateway HTTP APIs using private integrations with an Application Load Balancer, Network Load Balancer, or AWS Cloud Map service discovery. This lets an API route requests to containers running in private subnets.

Amazon CloudWatchAmazon CloudWatch

AWS Fargate tasks can send container logs to CloudWatch Logs, while ECS publishes service metrics and supports Container Insights for Fargate workloads. CloudWatch alarms can detect failures or drive ECS service scaling.

Amazon CodeGuruAmazon CodeGuru

Applications running on AWS Fargate can use the CodeGuru Profiler agent to collect runtime profiles. These profiles help identify expensive methods and CPU bottlenecks inside containerized Java or Python applications.

Amazon Data FirehoseAmazon Data Firehose

AWS Fargate tasks on ECS can route container logs to Amazon Data Firehose through FireLens. Firehose can then deliver those logs to destinations such as Amazon S3 or Amazon OpenSearch Service.

Amazon DevOps GuruAmazon DevOps Guru

Amazon DevOps Guru can analyze supported ECS service metrics for services running on AWS Fargate. It identifies anomalous operating behavior and provides insights that help investigate application performance problems.

Amazon Elastic Block Store (Amazon EBS)Amazon Elastic Block Store (Amazon EBS)

AWS Fargate tasks on ECS can attach an ECS-managed Amazon EBS volume using the task or service volume configuration. ECS manages the volume lifecycle, providing block storage for workloads such as data processing.

Amazon Elastic Container Service (Amazon ECS)Amazon Elastic Container Service (Amazon ECS)

AWS Fargate provides managed compute capacity for ECS tasks and services. ECS task definitions specify container images, CPU, memory, networking, and other settings without requiring you to manage container hosts.

Amazon Elastic File System (Amazon EFS)Amazon Elastic File System (Amazon EFS)

AWS Fargate workloads can mount Amazon EFS file systems for persistent, shared storage. ECS tasks configure EFS volumes in task definitions, while EKS Fargate Pods use supported EFS persistent volumes.

What is AWS Fargate

3 min read

AWS Fargate is a powerful compute engine within the Amazon Web Services (AWS) ecosystem, designed to run containers without requiring the user to manage the underlying servers or clusters. In the realm of cloud computing and containerization, Fargate stands out by offering a serverless experience that abstracts the complexity of scaling, patching, and securing servers, thereby allowing developers to focus purely on building and deploying their applications. Users configure the resources requested for each task or pod.

Fargate enforces per-account, per-Region launch-rate quotas for Amazon ECS tasks and Amazon EKS pods using a token bucket. The bucket capacity permits bursts, while its refill rate governs sustained launches.

At its core, Fargate is designed to work seamlessly with Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS), facilitating easy deployment of applications packaged as containers. By utilizing Fargate with ECS or EKS, users can launch and manage containers without having to provision or manage the infrastructure traditionally associated with containerized workloads. This significantly lowers the barrier to entry for deploying containerized applications and enables organizations to adopt a microservices architecture more smoothly and efficiently. 

Fargate supports Linux/x86, Linux/Arm, and Windows/x86 configurations. Windows and Arm configurations are available only with Amazon ECS. Fargate Spot capacity is available only for Amazon ECS tasks using Linux on x86 or Arm.

One of the key benefits of AWS Fargate is its pricing model. Charges are based on the requested vCPU, memory, operating system, CPU architecture, and storage resources for each task or pod, rather than only on resources actively consumed by the application. This pay-as-you-go pricing model provides significant cost efficiencies and flexibility, making Fargate an attractive option for both startups and large enterprises looking to optimize their cloud spend. Security is another area where AWS Fargate shines. It is integrated with AWS Identity and Access Management (IAM), allowing for granular control over which resources an application can access. This is complemented by the inherent security benefits of a managed service where AWS is responsible for applying patches and updates to the underlying infrastructure, thus helping to mitigate the risk of security vulnerabilities. 

Moreover, Fargate simplifies the deployment and management process by providing native integration with several AWS services and features, such as Amazon CloudWatch for logging and monitoring, AWS CloudFormation for infrastructure as code, and AWS CodePipeline for continuous integration and continuous deployment (CI/CD) workflows. These integrations empower developers to adopt modern application development and deployment practices, further enhancing the agility and efficiency of the software development lifecycle. 

In conclusion, AWS Fargate is a pivotal service within the AWS suite that caters to the growing demand for serverless computing options. By eliminating the need to manage servers or clusters, allowing for precise resource provisioning, and integrating tightly with other AWS services, Fargate provides a robust platform for deploying and managing containerized applications at scale. Its appeal lies in simplifying operations, reducing costs, and enhancing security, making it an essential tool for modern developers and businesses looking to leverage the full power of cloud computing.

Concepts related to AWS Fargate

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.