New: Manage Free Templates for AWS CloudFormation with the widdix CLI

EC2 Container Service (ECS) is a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers on a cluster of Amazon EC2 instances. To run an application on ECS you need the following components:

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

ECS cluster

This template describes a fault tolerant and scalable ECS cluster on AWS. The cluster scales the underlying EC2 instances based on memory and CPU reservation. In case of a scale down, the instance drains all containers before it is terminated.

Architecture

Installation Guide

  1. This templates depends on our vpc-*azs.yaml template. 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

  • vpc/vpc-*azs.yaml (required)
  • vpc/vpc-*-bastion.yaml (recommended)
  • security/auth-proxy-*.yaml
  • operations/alert.yaml (recommended)

ECS service

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

The image needs to expose port 80 or the AWS::ECS::TaskDefinition needs to be adjusted!

We provide two 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).

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

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

Architecture

Installation Guide

  1. This templates depends on our cluster.yaml template. 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

  • ecs/cluster.yaml (required)
  • operations/alert.yaml (recommended)

Using a dedicated load balancer for the service

This template describes a fault tolerant and scalable ECS service that uses a dedicated load balancer for the service.

Architecture

Installation Guide

  1. This templates depends on our cluster.yaml template. 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

  • vpc/vpc-*azs.yaml (required)
  • ecs/cluster.yaml (required)
  • operations/alert.yaml (recommended)