Skip to content

Github Action to run an ECS Exec command in a fargate cluster

Notifications You must be signed in to change notification settings

risk3sixty/ecs-exec

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'