ecs-local
Run ECS task definitions locally.
ecs-local
?
What is How it works
- Logs into AWS ECS and retrieves the task definition, image, and port mappings
- Logs into docker and pulls the image
- Parses the task definition to extract the entry point, command, volume mounts, and environment variables
- Set the docker argument for the: entry point
- Set the docker argument for the: command
- Set the docker arguments for the: volume mounts
- Set the docker arguments for the: environment variables
- Runs the docker command with the set docker arguments to start the container
Use Cases
Usage
ecs-local -e SOME_VAR=FOO-t stage-accounts -m src:dest -c ecs-local-config.yaml -a '/bin/bash'
Installation
macOS
brew tap fullscreen/tap
brew install ecs-local
Caveats
Network Access
This utility creates docker containers on your local machine based off of task definitions in ECS.
As a result the spawned task may not have the same network access as the remote ECS task.
Assuming Roles
ecs-local
will attempt to assume the role of the specified task.
If it is unable to do so it will fail silently and a warning message will be printed if the verbose
flag is passed.
Releases
This repository makes use of GoReleaser for building and pushing the Homebrew formula to the Homebrew Tap at: https://github.com/Fullscreen/homebrew-tap
References
Terminology
Homebrew
Term | Description | Example |
---|---|---|
Formula | The package definition | /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/foo.rb |
Keg | The installation prefix of a Formula | /usr/local/Cellar/foo/0.1 |
Keg-only | A Formula is Keg-only if it is not linked into the Homebrew prefix | The openjdk formula |
opt prefix | A symlink to the active version of a Keg | /usr/local/opt/foo |
Cellar | All Kegs are installed here | /usr/local/Cellar |
Tap | A Git repository of Formulae and/or commands | /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core |
Bottle | Pre-built Keg used instead of building from source | qt-4.8.4.catalina.bottle.tar.gz |
Cask | An extension of Homebrew to install macOS native apps | /Applications/MacDown.app/Contents/SharedSupport/bin/macdown |
Brew Bundle | An extension of Homebrew to describe dependencies | brew 'myservice', restart_service: true |