Setup a High-Availability Docker Swarm Stack on AWS

Written by JP La Torre
#HighAvailability #Docker Stack


In this article, you’ll find several CloudFormation templates. They will help you set up and deploy a High-Availability Docker stack so you can easily install Docker Swarm on AWS. You can have a Docker-ready environment in minutes by launching each stack in the order below. Satisfying DevOps best practices means repeatable infrastructure and application deployments. The templates contained here are very similar to what you get when using Caylent – give it a try, it’s free.

You can deploy each CloudFormation stack by clicking the ‘Launch Stack’ button underneath the description. They are intended to be used collectively. The Alert stack is optional but advisable.

The Docker Stack is designed with Docker Swarm in mind, though it can be used with just about any scheduler or orchestration engine.

If you’re looking for ways to use these stacks, we recommend checking out our other articles, like Creating a High-Availability WordPress cluster with Docker Swarm and EFS.


These templates are completely free, open source, and available on our GitHub. If this guide helped you please consider contributing a pull request or giving the repo a star.

Here are some additional resources to help you begin:

Deploy a VPC

Launch a VPC with 2 private and 2 public subnets in 2 availability zones for High-Availability Stacks.

Launch a VPC

Configure an Alert (optional)

Creates an SNS topic that alerts you if there is an event in your Stack(s).

Launch an Alert

Launch a High-Availability Docker Stack

Creates the infrastructure so you can run Docker Swarm in HA; includes two auto-scaling groups containing EC2 instances and a master load balancer.

Launch a High-Availability Docker Stack

Caylent provides a critical DevOps-as-a-Service function to high growth companies looking for expert support with microservices, containers, cloud infrastructure, and CI/CD deployments. Our managed and consulting services are a more cost-effective option than hiring in-house, and we scale as your team and company grow. Check out some of the use cases, learn how we work with clients, and profit from our DevOps-as-a-Service offering too.

The DevOps container management platform

  • Amazon AWS
  • Microsoft Azure
  • Google Cloud
  • Digital Ocean

Unlimited users. Unlimited applications. Unlimited stacks. Easily manage Docker containers across any cloud.

Get Started—Free!
%d bloggers like this: