A lightweight utility to dump AWS Fargate's ECS containers environment variables locally
A lightweight utility to dump AWS Fargate's ECS containers environment variables locally
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.
brew tap dineshgowda24/dineshgowda
brew install ecsnv
go install github.com/dineshgowda24/ecsnv@latest
Fetching ENVs for a specific cluster and service
ecsnv --cluster <cluster_name> --service <service_name>
ecsnv --cluster <cluster_name> --service <service_name> --file <file_name>
Fetching ENVs for a specific cluster and service from a particular profile
If a profile is not passed, then the default profile is used.
ecsnv --cluster <cluster_name> --service <service_name> --profile <aws_profile_name>
ecsnv --cluster <cluster_name> --service <service_name> --file <file_name> --profile <aws_profile_name>
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.
ecsnv
ecsnv --file <file_name>