ECS Deploy
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
| Parameter | Type | Description |
|---|---|---|
cluster_name | string | The name of the ECS cluster. |
service_name | string | The name of the ECS service to update. |
reference_task_definition | string | The ARN of the reference task definition to base the deployment on. |
images | array<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
| Parameter | Type | Default | Description |
|---|---|---|---|
account_id | string | - | The AWS account ID where the ECS cluster is located. Defaults to stage account. |
region | string | - | The AWS region of the ECS cluster. Defaults to stage region. |
timeout | integer | 360 | Deployment 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