Skip to content

Configuration Root Fields

# .ecsdeployer.yml
project: myapp
cluster: mycluster
image: ...
role: ...
services:
  - ...
cronjobs:
  - ...
settings: ...
# ...

Fields

project - (required)

The project name will be used to construct the names of all tasks. It should be short, and should only contain letters, numbers, dashes

project: deployer-test
cluster - (required)

You must specify a cluster key that provides either an ECS Cluster name or ARN.

cluster: mycluster
cluster: arn:aws:ecs:us-east-1:1234567890:cluster/mycluster
image - (recommended)

See Specifying Container Image below.

role - (recommended)

This is the application role (Task Role). This is what your application will use when it is running normally. This is highly recommended, although not required.

You can specify roles using the full ARN or the name of the role. Roles must already exist, they will not be created for you.

execution_role - (required)

This is the role that AWS ECS will use to run your tasks.

Read more: Amazon ECS task execution IAM

You can specify roles using the full ARN or the name of the role. Roles must already exist, they will not be created for you.

cron_launcher_role - (required if using CronJobs)

This is the role that EventBridge Scheduler will use to launch your task based on the schedule you specify.

You can specify roles using the full ARN or the name of the role. Roles must already exist, they will not be created for you.

An example policy can be seen on the AWS IAM Permissions page.

service_role

If you need to set a Service-Linked role, you can specify it here.

Once you create a service with this role, you cannot change it. You will need to manually delete the service and redeploy.

Note: This is a very non-standard thing. Unless you explicitly need this, you should leave this field blank.

network - (required)

See Networking

services - (recommended)

See Services

This is not required, but if you don't provide it... why even use this project?

cronjobs

See CronJobs

predeploy

See PreDeploy Tasks

console

See Remote Shell

environment

See Environment Variables

task_defaults

See Task Defaults

name_templates

See Naming

logging

See Logging

tags

Specify a set of tags that will be applied to all resources.

See Tags Documentation for more information

settings

See Settings

Specifying Container Image

image:
  ecr: myapp
  tag: "{{ .ImageTag }}"
ecr

The AWS Elastic Container Repository to pull from.

You can specify this as:

  • a name (which will be converted to a full URL for you)
  • a full hostname/path

Conflicts with docker

docker

Reference a DockerHub repository.

Conflicts with ecr

tag

Pulls an image using its tag. This is the most common usage.

Examples: latest, v1.2.3

Default: {{ .ImageTag }} (what you pass in as --image-tag)

Conflicts with digest

digest

Pulls an image using its digest value.

Should be in the format of sha256:<hexvalue>

Conflicts with tag

Note: You may use templates in all fields.

You can specify the full URI to a container image as a string.

You may use templates in the string.

Examples:

image: "01234567890.dkr.ecr.REGION.amazonaws.com/thing/stuff:latest"
image: "01234567890.dkr.ecr.REGION.amazonaws.com/thing/stuff:{{ .ImageTag }}"
image: "nginx:1.2.3"