Are you like me and want your containers up and running fast and simple and with as little configuration as possible? Then AWS Fargate might be your thing.

What is it?

Amazon describes it as a way to “Run containers without managing servers or clusters”. It is basically a way of running your apps without having to manage servers or scaling clusters. Fargate is part of Amazons Elastic Container Service (ECS).

It is the perfect choice for developers that want to run apps with low traffic without spending too much on overpowered EC2 instances. But it will also be able to scale up if there would be higher traffic during some points in the day.

“AWS Fargate removes the need for you to interact with or think about servers or clusters”

“Tiny” tutorial

To follow this introduction into AWS Fargate you need to know a bit about dealing with docker images. You also need a domain managed on AWS Route 53 if you want to hook it up to your app.

To run a container, we must host our docker image on AWS, we need a Cluster to run services, a Task-Definition which defines what container to run and how to run it in a service. We also need the service itself and a load balancer to point traffic from the web to our service in the cluster. Finally we must define some security policies for our cluster and load balancer. That should be all… so lets start by:

1. Creating a docker image repository

First we must sign in to our AWS console and create a repo for our docker images. Open the AWS console and go to the service Elastic Container Repository and create a new repo. This is where you will store your docker images that will run in your Fargate cluster.