ECS Setup


This article explains on how to create an AWS network in VPC and ECS Cluster using CloudFormation template. It includes the following topics:


Configuring ECS

To configure ECS, follow the steps below:

  1. Navigate to AWS CloudFormation -> Stacks -> Create stack.
    Note: Before you create a stack, you must have a template that describes what resources AWS CloudFormation will include in your stack.
  2. Prepare a template.
  3. Specify the template by uploading zero-vpc-ecs.yaml to create a dedicated VPC.


  4.  Specify stack details by filling in the following information:
    • Stack name: zero-vpc
    • Parameters: IP CIDR for VPC —


      VPC is successfully created.

  1. Use zero-mssql.yaml to create a test database. To do that, fill in the following information:
    • Stack name: zero-mssql
    • ParentVPCStack: zero-vpc


  1. Fill in the other parameters as required.


Creating an ECS Cluster

To create an ECS cluster, follow the steps below:

  1. From the CloudFormation console, use zero-ecs.yaml to create the ECS cluster.


Fill in the following information:

    • Your ECS cluster name
    • Select VPC
    • Select public and private subnets
    • Your instance type (for details, see Amazon EC2 Instance Types)
    • Max and min size of your cluster
      Note: This is the number of EC2 instances per cluster. For development and testing purposes both can be set to 1.
    • Load Balancer scheme
      Note: If you need the application to be accessible from the internet, select "internet-facing."
    • Service tasks autoscaling (select true and write max, min, desired count)
    • Docker image URI
    • Secret manager ARN created in the Preparation page
      Note: These options are optional.
    • If you need to use HTTPS with a custom FQDN, create a subdomain in your hosted zone and certificate in AWS Certificate Manager. Enter the certificate ARN in LoadBalancerCertificateArn. Afterward, in the route53 hosted zone, alias the subdomain to LoadBalancer FQDN.


Was this article helpful?

0 out of 0 found this helpful



Still have some questions?