GithubHelp home page GithubHelp logo

isabella232 / ecs-run-task Goto Github PK

View Code? Open in Web Editor NEW

This project forked from buildkite/ecs-run-task

0.0 0.0 0.0 623 KB

Run a once-off task on Amazon ECS and stream the output

License: MIT License

Go 98.06% Makefile 1.94%

ecs-run-task's Introduction

ecs-run-task Build status

Runs a once-off ECS task and streams the output via Cloudwatch Logs.

Usage

NAME:
   ecs-run-task - run a once-off task on ECS and tail the output from cloudwatch

USAGE:
   ecs-run-task [options] [command override]

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug                        Show debugging information
   --file value, -f value         Task definition file in JSON or YAML
   --name value, -n value         Task name
   --cluster value, -c value      ECS cluster name (default: "default")
   --log-group value, -l value    Cloudwatch Log Group Name to write logs to (default: "ecs-task-runner")
   --service value, -s value      service to replace cmd for
   --fargate                      Specified if task is to be run under FARGATE as opposed to EC2
   --security-group value         Security groups to launch task in (required for FARGATE). Can be specified multiple times
   --subnet value                 Subnet to launch task in (required for FARGATE). Can be specified multiple times
   --env KEY=value, -e KEY=value  An environment variable to add in the form KEY=value or `KEY` (shorthand for `KEY=$KEY` to pass through an env var from the current host). Can be specified multiple times
   --inherit-env, -E              Inherit all of the environment variables from the calling shell
   --count value, -C value        Number of tasks to run (default: 1)
   --region value, -r value       AWS Region
   --deregister                   Deregister task definition once done
   --help, -h                     show help
   --version, -v                  print the version

Example

$ aws-vault exec myprofile -- ecs-run-task --file examples/helloworld/taskdefinition.json echo "Hello from Docker!"

Hello from Docker!
...

IAM Permissions

The following IAM permissions are required:

- PolicyName: ECSRunTask
  PolicyDocument:
    Version: '2012-10-17'
    Statement:
    - Effect: Allow
      Action:
        - ecs:RegisterTaskDefinition
        - ecs:DeregisterTaskDefinition
        - ecs:RunTask
        - ecs:DescribeTasks
        - logs:DescribeLogGroups
        - logs:DescribeLogStreams
        - logs:CreateLogStream
        - logs:PutLogEvents
        - logs:FilterLogEvents
      Resource: '*'

Development

We're using Go 1.11 with modules.

export GO111MODULE=on
go get -u github.com/buildkite/ecs-run-task

ecs-run-task's People

Contributors

eli-goldberg avatar lox avatar mikeocool avatar paulbes avatar porty avatar sherzberg avatar syerad avatar vektah avatar yob avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.