GithubHelp home page GithubHelp logo

aws-ecs-utils's Introduction

AWS Container Service (ECS) CLI utils

Connect to shell of containerized application like you were used to before Docker.

Installation

  1. (Prereq) Install awscli (https://aws.amazon.com/cli/) and jq (https://stedolan.github.io/jq/)
  2. Make sure you have aws configured with stored authentication
  3. Download bin folder from this repository and copy content to your /usr/local/bin
  4. Add path to your ECS PEM file to ECS_PEM_FILE environment variable

Commands

Conventions

All commands expect your aws command is configured with default AWS region. Also majority of commands expect ECS_PEM_FILE ENV variable to be pointing to PEM file for SSH access to ECS cluster hosts.

ecs-run-shell

Start new ECS task with overridden CMD to sleep 30m and connect to its shell. Stops tasks after shell is exited.

ecs-run-shell cluster-name task-definition-name[:version]

This is useful to run your app framework console (like rails console) within environment and with ENV variables of your ECS service or task while not risking failure of already running containers.

If task definition defines more than 1 container, all of containers are started but it connects you to first one.

ecs-connect

Connect to running container of specific service.

ecs-connect cluster-name service-name

This is useful to investigate inner state of processes inside container or run processes with available environment variables from task definition.

If your service is running more than 1 task, first task provided by aws interface is used to connect to.

If your task has more than 1 containers, first container is taken.

Warning: Be aware that you are inside container that runs the main process already. Starting heavy processes may cause the whole container will run out of memory and be killed.

aws-ecs-utils's People

Contributors

docx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

aws-ecs-utils's Issues

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.