AWS ECS Deploy Action
To automatically edit task definitions via jq to then deploy & monitor.
During our movement replacing EC2 with ECS we needed a solution to deploy our applications. This resulted in the creation of this action that allows us to modify Task Definitions, upload them and trigger a deployment in one quick action.
We wanted to build a singular action - as all officially offered solutions worked with a variety of pieces and lacked monitoring. Our pure Bash solution works as follows:
- Downloads the latest task definition defined by the
service_task_definition_name
input. - Automatically injects new image paths into the task definition, based on
container_image_images
input. - Uploads the new task definition to AWS.
- Triggers a deployment of the service defined by the
ecs_service_name
input. - Polls the service until the deployment is complete with informational output on the Failed, Pending, Desired and Running tasks.
This allowed us to maintain roughly the same workflow we had with EC2 and a similar action we built.
info
Find on GitHub at sourcetoad/aws-ecs-deploy-action