Skip to main content

ECS Deploy

Stable

Type: DEVRAMPS:ECS:DEPLOY

Category: deploy

Version: 1.0.0


Description

Deploy a container image to an Amazon ECS service with rolling updates.

Deploys a Docker container to an Amazon ECS (Elastic Container Service) cluster. Creates a new task definition revision with the specified container image, then updates the service to use the new task definition. Supports rolling deployments with configurable health checks, automatic rollback on failure, and integration with Application Load Balancers. The step waits for the deployment to stabilize before marking as complete.

Parameters

Required Parameters

ParameterTypeDescription
cluster_namestringThe name of the ECS cluster.
service_namestringThe name of the ECS service to update.
reference_task_definitionstringThe ARN of the reference task definition to base the deployment on.
imagesarray<object>List of container images to deploy. Each entry maps a container name in the task definition to the image URL to use.

Optional Parameters

ParameterTypeDefaultDescription
account_idstring-The AWS account ID where the ECS cluster is located. Defaults to stage account.
regionstring-The AWS region of the ECS cluster. Defaults to stage region.
timeoutinteger360Deployment timeout in minutes.

Example Usage

- type: DEVRAMPS:ECS:DEPLOY
name: Deploy API to ECS
params:
cluster_name: my-cluster
service_name: api-service
reference_task_definition: arn:aws:ecs:us-east-1:123456789012:task-definition/api:1
images:
- container_name: api
image: "${{ stage.artifacts["API Image"].image_url }}"
- container_name: sidecar
image: "${{ stage.artifacts["Sidecar Image"].image_url }}"
timeout: 30