e1s

module
v1.0.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT

README

e1s

E1S - Easily Manage AWS ECS Resources in Terminal 🐱

e1s is a terminal application to easily browse and manage AWS ECS resources, with a focus on Fargate. Inspired by k9s.

e1s-screenshot

A quick video demo

e1s-demo

AWS credentials and configuration

e1s uses the default aws-cli configuration. It does not store or send your access and secret key anywhere. The access and secret key are used only to securely connect to AWS API via AWS SDK. Both profile and region are overridable via the AWS_PROFILE, AWS_REGION prepend environment variable or --profile, --region option.

Installation

e1s is available on Linux, macOS and Windows platforms.

  • Binaries for Linux, Windows and Mac are available in the release page.
  • Via Homebrew for maxOS or Linux
brew install keidarcy/tap/e1s
# upgrade
# brew upgrade keidarcy/tap/e1s

Features

Basic
  • Read only mode
  • Auto refresh
  • Describe clusters
  • Describe services
  • Describe tasks
  • Describe containers
  • Describe task definitions
  • Describe service autoscaling
  • Show cloudwatch logs(only support awslogs logDriver)
    • Realtime log streaming(only support one log group)
  • Show Metrics
    • CPUUtilization
    • MemoryUtilization
  • Show autoscaling target and policy
  • Open selected resource in browser(support new UI(v2))
  • Interactively exec towards containers(like ssh)
  • Edit service
    • Desired count
    • Force new deployment
    • Task definition family
    • Task definition revision
  • Register new task definition
  • Start port forwarding session
  • Start remote host port forwarding session
  • Transfer files to and from your local machine and a remote host like aws s3 cp
Interactively exec towards containers(ECS Exec)

Use aws-ecs-exec-checker to check for the pre-requisites to use ECS exec.

interactive exec demo

e1s-interactive-exec-demo

Use ctrl + d to exit interactive-exec session.

Troubleshooting

The execute command failed because execute command... - check service execute command, task role policy

Session Manager plugin not found - document.

Update service(Docs)
update service demo

update-service-demo

  • Force new deployment
  • Desired tasks
  • Task definition family
  • Task definition revision
Register task definition(Docs)
Register task definition

register-task-definition-demo

Start port forwarding session(Docs)

With a specified task and container, to start port forwarding session you need to specify a port and a local port. The local port is the port on your local machine that you want to use to access the container port.

Port forwarding session

port-forwarding-session-demo

Start remote host port forwarding session(Docs)

With a specified task and container, to start a remote host port forwarding session you need to specify a port, a host and a local port. The local port is the port on your local machine that you want to use to access the remote host port though container.

Remote host port forwarding session

remote-host-port-forwarding-session-demo

File transfer

Since file transfer though a S3 Bucket and aws-cli in container, you need a S3 bucket and add permissions S3 bucket permission to the task role and e1s role, and also need a aws-cli installed container.

File transfer

file-transfer-demo

Usage

Make sure you have the AWS CLI installed and properly configured with the necessary permissions to access your ECS resources, and session manager plugin installed if you want to use the interactive exec or port forwarding features.

  • Usage of e1s:
$ e1s -h
e1s is a terminal application to easily browse and manage AWS ECS resources 🐱.
Check https://github.com/keidarcy/e1s for more details.

Usage:
  e1s [flags]

Flags:
  -d, --debug                  sets debug mode
  -h, --help                   help for e1s
  -j, --json                   log output json format
  -l, --log-file-path string   specify the log file path (default "${TMPDIR}e1s.log")
      --profile string         specify the AWS profile
      --readonly               sets read only mode
  -r, --refresh int            specify the default refresh rate as an integer (sec) (default 30, set -1 to stop auto refresh) (default 30)
      --region string          specify the AWS region
  -s, --shell string           specify interactive ecs exec shell (default "/bin/sh")
  -v, --version                version for e1s
  • Using default profile
$ e1s
  • Using my-profile profile, us-east-1 region
$ AWS_PROFILE=my-profile AWS_REGION=us-east-1 e1s
# OR
$ e1s --profile my-profile --region us-east-1
  • Using read only, debug, stop auto refresh with a custom log path json output
$ e1s --readonly --debug --refresh -1 --log-file-path /tmp/e1s.log --json
Key Bindings

Press ? to check overall key bindings, top right corner to check current resource specific hot keys.

Development
go run cmd/e1s/main.go --debug --log-file-path /tmp/e1s.log
tail -f /tmp/e1s.log

Feature Requests & Bug Reports

If you have any feature requests or bug reports, please submit them through GitHub Issues.

Publish new version

  • Bump version
  • make tag

Thanks

License

MIT

Directories

Path Synopsis
cmd
e1s
internal
api
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL