Skip to main content
Knowledge Base

Extending ECS Deploy Runner with custom scripts

Answer

We are looking to add run some extra commands while running ECS Deploy Runner, like printing the IP address of the ECS Task while its running. How should I go about doing that?

The best way to do this is to modify the existing trigger scripts that are installed into the docker container [here](https://github.com/gruntwork-io/terraform-aws-ci/tree/master/modules/ecs-deploy-runner/docker/deploy-runner) (those that are being put into `/opt/ecs-deploy-runner/scripts`). The nice thing about this approach is that this allows you to keep all the container and script configurations that the standard deployment supports. If on the other hand, you would like to add new trigger scripts or additional arguments, you will need to additionally extend the container and script configurations. Specifically, the scripts need to be added to the script config created for each container [here](https://github.com/gruntwork-io/terraform-aws-ci/tree/master/modules/ecs-deploy-runner-standard-configuration).