Skip to content
play

GitHub Action

ECS Exec

v1.3 Latest version

ECS Exec

play

ECS Exec

Execute a command in a fargate cluster using ECS exec

Installation

Copy and paste the following snippet into your .yml file.

              

- name: ECS Exec

uses: risk3sixty/[email protected]

Learn more about this action in risk3sixty/ecs-exec

Choose a version

AWS ECS Exec with Nodejs

This executes a given command in the specified ECS Fargate Service. It assumes that all tasks within a service are the same, and it doesn't matter which task the command runs on. We use it to perform database migrations.

Inputs

region

Required Region the ECS cluster is in.

cluster_name

Required ECS cluster the target container is a part of.

service_name

RequiredECS Service the target container is a part of.

command

Required Command to run within the targeted service.

Outputs

Example usage

uses: ris3sixty/[email protected]
with:
	region: 'us-east-1'
	cluster_name: 'my-cluster'
	service_name: 'my-service'
	command: 'npm run migrate'