Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dineshgowda24/ecsnv
A lightweight utility to dump AWS Fargate's ECS containers environment variables locally
https://github.com/dineshgowda24/ecsnv
aws aws-sdk cli ecs-cluster ecs-fargate ecs-service golang golang-application homebrew
Last synced: 18 days ago
JSON representation
A lightweight utility to dump AWS Fargate's ECS containers environment variables locally
- Host: GitHub
- URL: https://github.com/dineshgowda24/ecsnv
- Owner: dineshgowda24
- License: mit
- Created: 2023-02-26T13:13:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-26T17:16:33.000Z (almost 2 years ago)
- Last Synced: 2024-06-20T15:47:48.401Z (7 months ago)
- Topics: aws, aws-sdk, cli, ecs-cluster, ecs-fargate, ecs-service, golang, golang-application, homebrew
- Language: Go
- Homepage:
- Size: 1.33 MB
- Stars: 30
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ecsnv
[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/gomods/athens.svg)](https://github.com/gomods/athens)
A lightweight utility to dump AWS Fargate's ECS containers environment variables locally
## Motivation
More often than not, during the development cycle. I keep looking at my AWS ECS cluster and services to check what all environment
variables have been set. Some ENVs were not readily available in the project repository since they were configured as secrets in SSM's parameter store.While setting up an application or debugging some issue, I kept looking for env values for a set in different environments by logging in to the AWS console, which is painstakingly slow and hampers productivity.
Hence the tool.
## Installation
### Homebrew
```shell
brew tap dineshgowda24/dineshgowda
brew install ecsnv
```### Go
```shell
go install github.com/dineshgowda24/ecsnv@latest
```## Usage
1. Fetching ENVs for a specific cluster and service
1. Prints locally in the shell
```shell
ecsnv --cluster --service
```2. Writes to a file
```shell
ecsnv --cluster --service --file
```2. Fetching ENVs for a specific cluster and service from a particular profile
If a profile is not passed, then the default profile is used.
1. Prints locally in the shell
```shell
ecsnv --cluster --service --profile
```2. Writes to a file
```shell
ecsnv --cluster --service --file --profile
```3. You can ignore the cluster or service name. The application will list all the clusters and services in the profile with an easy-to-use interactive shell.
1. Prints locally in the shell
```shell
ecsnv
```2. Writes to a file
```shell
ecsnv --file
```## Demo
### Printing ENVs in terminal
![](print.gif)
### Writing ENVs to file
![](write.gif)