ECS Setup

Updated:

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.

    Picture5.png

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

      Picture6.png

      VPC is successfully created.

      Picture10.png
  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

Picture7.png

  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.

Picture12.png

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.

Picture14.png

Was this article helpful?

0 out of 0 found this helpful


Discussions

0 comments

Still have some questions?