»AWS ECS

»Builders

ECS uses Docker images for building, which are generated by these builders:

»aws-ecr (registry)

Store a docker image within an Elastic Container Registry on AWS.

»Interface

  • Input: docker.Image
  • Output: docker.Image

»Variables

»region

The AWS region the ECR repository is in.

  • Type: string

»repository

The ECR repository to store the image into.

This ECR repository must already exist, waypoint will not create it.

  • Type: string

»tag

The docker tag to assign to the new image.

  • Type: string

»Examples


registry {
    use "aws-ecr" {
      region = "us-east-1"
      repository = "waypoint-example"
      tag = "latest"
    }
}

»aws-ecs (platform)

Deploy the application into an ECS cluster on AWS.

»Interface

  • Input: docker.Image
  • Output: ecs.Deployment

»Variables

»alb

  • Type: *ecs.ALBConfig

»alb.certificate

The ARN of an AWS Certificate Manager cert to associate with the ALB.

»alb.domain_name

Fully qualified domain name to set for the ALB.

Set along with zone_id to have DNS automatically setup for the ALB. this value should include the full hostname and domain name, for instance app.example.com.

»alb.listener_arn

The ARN on an existing ALB to configure.

When this is set, no ALB or Listener is created. Instead the application is configured by manipulating this existing Listener. This allows users to configure their ALB outside waypoint but still have waypoint hook the application to that ALB.

»alb.zone_id

Route53 ZoneID to create a DNS record into.

Set along with alb.domain_name to have DNS automatically setup for the ALB.

»cluster

The name of the ECS cluster to deploy into.

The ECS cluster that will run the application as a Service. if there is no ECS cluster with this name, the ECS cluster will be created and configured to use Fargate to run containers.

  • Type: string
  • Optional

»count

How many instances of the application should run.

  • Type: int
  • Optional

»cpu

How many cpu shares the container running the application is allowed.

On Fargate, possible values for this are configured by the amount of memory the container is using. Here is a complete listing of possible values: 512MB: 256 1024MB: 256, 512 2048MB: 256, 512, 1024 3072MB: 512, 1024 4096MB: 512, 1024, 2048 5120MB: 1024, 2048 6144MB: 1024, 2048 7168MB: 1024, 2048 8192MB: 1024, 2048, 4096 9216MB: 2048, 4096 10240MB: 2048, 4096 11264MB: 2048, 4096 12288MB: 2048, 4096 13312MB: 2048, 4096 14336MB: 2048, 4096 15360MB: 2048, 4096 16384MB: 4096 17408MB: 4096 18432MB: 4096 19456MB: 4096 20480MB: 4096 21504MB: 4096 22528MB: 4096 23552MB: 4096 24576MB: 4096 25600MB: 4096 26624MB: 4096 27648MB: 4096 28672MB: 4096 29696MB: 4096 30720MB: 4096.

  • Type: int
  • Optional

»ec2_cluster

Indicate if the ECS cluster should be EC2 type rather than Fargate.

This controls if we should verify the ECS cluster in EC2 type. The cluster will not be created if it doesn't exist, only that there as existing cluster this is using EC2 and not Fargate.

  • Type: bool
  • Optional

»log_group

The CloudWatchLogs log group to store container logs into.

  • Type: string
  • Optional
  • Default: derived from the application name

»memory

How much memory to assign to the container running the application.

When running in Fargate, this must be one of a few values, specified in MB: 512, 1024, 2048, 3072, 4096, 5120, and up to 16384 in increments of 1024. The memory value also controls the possible values for cpu.

  • Type: int

»region

The AWS region for the ECS cluster.

  • Type: string

»role_name

The name of the IAM role to use for ECS execution.

  • Type: string
  • Optional
  • Default: create a new IAM role based on the application name

»subnets

The VPC subnets to use for the application.

  • Type: []string
  • Optional
  • Default: public subnets in the default VPC

»Examples


deploy {
  use "aws-ecs" {
    region = "us-east-1"
    memory = "512"
  }
}