This is a simple cli to fetch env from ECS task definition or Lambda function and write it down in a .env format to be ready to use
That cli works on the assumption that the aws cli is installed. It has been tested with version 2.34.41.
You need to use the aws cli to login to a profile locally on your computer. You then need to login to the account you want to use. For example if you have sso configured
aws sso login --profile FooDownload the .exe file and add the path to your Env Variables.
Clone that repo and build the code
cargo build --releaseThen add the .exe file from ./target/release to your Env Variables
aws-env --helpaws-envThen answer the questions. The profile you use should be already logged in.
- --profile, -p : This is the aws profile that will be used to fetch infos
- --output, -o : This is the name of the output file the cli will write to
- --what, -w : This is the type of ressource you want to target.
- --credentials : Fetch access tokens
- --task-definition, -t : The task definition name.
- --lambda, -l : The lambda function name
- Adding an arg to add a valid AccessToken to the output file + AWS_REGION if needed
- Adding support for env override in case local dev has different requirements.
- Remove the nasty unwrap and handle errors in a cleaner way than just exploding