Skip to content

Settings

This allows you to override specific settings used in the deployer. For the most part, you should never need to modify these.

Example

settings:
  predeploy_timeout: 90m
  skip_deployment_env_vars: false

  ssm_import: /path/to/project/secrets

Fields

ssm_import

See SSM Parameter Store Secrets Import

It is highly recommended you enable this!

Default: disabled (see SSM Parameter Store Secrets Import for defaults)

predeploy_timeout

The maximum time that a predeploy task may take to run. This is the default time, and can be overridden on a per-task basis.

Default: 5400 (seconds)

skip_cron_env_vars

This will prevent the extra environment variables from being added to your cron jobs.

For a list of env vars, see Cron Env Vars.

Default: false

skip_deployment_env_vars

This will prevent the extra deployment environment variables from being added to your application.

These are things like ECSDEPLOYER_IMAGE_TAG, ECSDEPLOYER_PROJECT, etc.

For a list of env vars, see Deployment Env Vars.

Default: false

disable_marker_tag

This will disable the creation of the marker tag used by the deployer to track resources it creates.

Disabling the marker tag also requires you to set keep_in_sync to false

It's recommended you do not disable this

Default: false (Marker tag will be used)

use_old_cron_eventbus

Use the old and deprecated method of creating CronJobs. The new method uses EventBridge Scheduler, which is much better.

This option is only really for legacy deployments that still use EventBridge targets/rules. You should not use this.

Default: false (Will use the newer EventBridge Scheduler)

keep_in_sync

See Keeping Resources In-Sync

wait_for_stable

See Service Stability Waiter


SSM Parameter Store Secrets Import

By default, this feature is disabled, but is highly recommended.

It will automatically look for environment variables in a specific path on AWS Parameter Store.

It's highly recommended that you use SSM Parameter Store to put sensitive values, rather than in plaintext.

settings:
  ssm_import: /path/to/project/parameters

This will enable SSM Secrets Importing, and will set the path as provided.

settings:
  ssm_import:
    enabled: true
    path: /path/to/project/parameters
enabled

Enable importing secrets from SSM Parameter

Default: false

path

This is the path prefix that will be searched to automatically add environment variables to your applications. If you do not want SSM Secrets, then set this to a blank string

/ecsdeployer/secrets/{PROJECT}
/ecsdeployer/secrets/{PROJECT}/{STAGE}
/ecsdeployer/secrets/{{ .Project }}{{ if .Stage }}/{{ .Stage }}{{ end }}
recursive

If you have multiple levels of parameters nested underneath the path provided above, then you will want to enable recursive import. If you do not, then some parameters will be ignored.

Default: true


Keeping Resources In-Sync

Important

This feature is reliant upon the Marker Tag. If you modify or change the tag or value, then any resources using that tag will be "invisible" to the Deployer.

settings:
  keep_in_sync: true
settings:
  keep_in_sync: false

Warning: Not recommended

If you disable this, then you are responsible for deleting unused services, cronjobs, task definitions, etc.

This means that services that you remove from the environment file will still be running old code after deploy.

settings:
  keep_in_sync:
    services: true
    cronjobs: false
    log_retention: true
    task_definitions: true
services

Removes services that no longer appear in the config file

cronjobs

Removes cronjobs that no longer appear in the config file

log_retention

Will update existing log groups to have the correct retention setting

task_definitions

Deregister any task definitions that point to tasks/services/crons that are no longer listed in the config file.


Service Stability Waiter

By default, the deployer will wait for your services to become stable according to ECS. If you do not want to wait, or need to customize that behavior, then you can do that here.

Shorthand to disable waiter (not recommended)

settings:
  wait_for_stable: false
disabled

Disable the waiter. Deployment will succeed immediately after services have been updated. (Regardless of if they actually work / are not in a crash loop).

Default: false

timeout

How long should the deployer wait for a service to become stable

Default: 1800 (seconds)

Deployment Env Vars

Variable Name Template
ECSDEPLOYER_APP_VERSION {{ .Version }}
ECSDEPLOYER_DEPLOYED_AT {{ .Date }}
ECSDEPLOYER_IMAGE_TAG {{ .ImageTag }}
ECSDEPLOYER_PROJECT {{ .Project }}
ECSDEPLOYER_STAGE {{ .Stage }}
ECSDEPLOYER_TASK_NAME {{ .Name }}

Any values that evaluate to a blank string will not be added to your environment.

Cron Env Vars

These are only added to cron jobs. Values are EventBridge Scheduler context attributes

Variable Name Template
ECSDEPLOYER_CRON_SCHEDULE_ARN <aws.scheduler.schedule-arn>
ECSDEPLOYER_CRON_SCHEDULED_TIME <aws.scheduler.scheduled-time>
ECSDEPLOYER_CRON_EXECUTION_ID <aws.scheduler.execution-id>
ECSDEPLOYER_CRON_ATTEMPT <aws.scheduler.attempt-number>