New: Become a sponsor via GitHub Sponsors!

Fargate runs highly scalable containers scheduled by the EC2 Container Service (ECS). To run an application on Fargate you need the following components:

We provide you templates for the Fargate cluster and the service. You need to publish the Docker image.

Fargate cluster

This template describes a fault tolerant and scalable Fargate cluster on AWS.

Amazon S3 URL: https://s3-eu-west-1.amazonaws.com/widdix-aws-cf-templates-releases-eu-west-1/v14.9.0/fargate/cluster.yaml

Installation Guide

  1. This template depends on one of our vpc-*azs.yaml templates. Launch Stack
  2. Launch Stack
  3. Click Next to proceed with the next step of the wizard.
  4. Specify a name and all parameters for the stack.
  5. Click Next to proceed with the next step of the wizard.
  6. Click Next to skip the Options step of the wizard.
  7. Check the I acknowledge that this template might cause AWS CloudFormation to create IAM resources. checkbox.
  8. Click Create to start the creation of the stack.
  9. Wait until the stack reaches the state CREATE_COMPLETE

Dependencies

Fargate service

This template describes a fault tolerant and scalable Fargate service on AWS. The service scales based on CPU utilization.

:books: Check out our new book Rapid Docker on AWS * Written for DevOps engineers and web developers who want to run dockerized web applications on AWS. * Prior knowledge of Docker and AWS is not required. * Continuous Deployment of your Web Application and Infrastructure as Code.

We provide three service templates: * service-cluster-alb.yaml uses the cluster's load balancer and path and/or host based routing. * service-dedicated-alb.yaml includes a dedicated load balancer (ALB). * service-cloudmap.yaml uses service discovery via Cloud Map instead of a load balancer.

Using the cluster's load balancer and path and/or host based routing

This template describes a fault tolerant and scalable Fargate service that uses the cluster's load balancer and path and/or host based routing for incoming traffic.

Amazon S3 URL: https://s3-eu-west-1.amazonaws.com/widdix-aws-cf-templates-releases-eu-west-1/v14.9.0/fargate/service-cluster-alb.yaml

Installation Guide

  1. This template depends on one of our vpc-*azs.yaml templates. Launch Stack
  2. This template depends on our cluster.yaml template. Launch Stack
  3. Launch Stack
  4. Click Next to proceed with the next step of the wizard.
  5. Specify a name and all parameters for the stack.
  6. Click Next to proceed with the next step of the wizard.
  7. Click Next to skip the Options step of the wizard.
  8. Check the I acknowledge that this template might cause AWS CloudFormation to create IAM resources. checkbox.
  9. Click Create to start the creation of the stack.
  10. Wait until the stack reaches the state CREATE_COMPLETE

Dependencies

Using a dedicated load balancer for the service

This template describes a fault tolerant and scalable Fargate service that uses a dedicated load balancer for incoming traffic.

Amazon S3 URL: https://s3-eu-west-1.amazonaws.com/widdix-aws-cf-templates-releases-eu-west-1/v14.9.0/fargate/service-dedicated-alb.yaml

Installation Guide

  1. This template depends on one of our vpc-*azs.yaml templates. Launch Stack
  2. This template depends on our cluster.yaml template. Launch Stack
  3. Launch Stack
  4. Click Next to proceed with the next step of the wizard.
  5. Specify a name and all parameters for the stack.
  6. Click Next to proceed with the next step of the wizard.
  7. Click Next to skip the Options step of the wizard.
  8. Check the I acknowledge that this template might cause AWS CloudFormation to create IAM resources. checkbox.
  9. Click Create to start the creation of the stack.
  10. Wait until the stack reaches the state CREATE_COMPLETE

Dependencies

Using service discovery (aka. Cloud Map)

This template describes a fault tolerant and scalable Fargate service that registers tasks at the service discovery registry (aka. Cloud Map). Allows inter-service communication without any load balancer in between.

Amazon S3 URL: https://s3-eu-west-1.amazonaws.com/widdix-aws-cf-templates-releases-eu-west-1/v14.9.0/fargate/service-cloudmap.yaml

Installation Guide

  1. This template depends on one of our vpc-*azs.yaml templates. Launch Stack
  2. This template depends on our cluster.yaml template. Launch Stack
  3. This template depends on our cloudmap-*.yaml template. Launch Stack
  4. This template depends on our client-sg.yaml template. Launch Stack
  5. Launch Stack
  6. Click Next to proceed with the next step of the wizard.
  7. Specify a name and all parameters for the stack.
  8. Click Next to proceed with the next step of the wizard.
  9. Click Next to skip the Options step of the wizard.
  10. Check the I acknowledge that this template might cause AWS CloudFormation to create IAM resources. checkbox.
  11. Click Create to start the creation of the stack.
  12. Wait until the stack reaches the state CREATE_COMPLETE

Dependencies