npm i -g awsu-cli
awsu exec -- aws s3 ls
Usage: awsu [options] [command]
AWS Utils CLI (npm package awsu-cli)
Options:
-V, --version output the version number
-d, --debug show debug logs
-p, --profile <profile> AWS profile to use
-r, --region <region> AWS region to use
-h, --help display help for command
Commands:
exec [options] <command> executes any command with injected AWS environment variables
help [command] display help for command
Usage: awsu exec [options] -- <command>
executes any command with injected AWS environment variables
Arguments:
command command to run with injected env vars
Options:
-e, --env-file <env-file> append dotenv file to env vars
-h, --help display help for command
Variable expansion is working: https://www.npmjs.com/package/dotenv-expand
$KEY
will expand any env with the name KEY${KEY}
will expand any env with the name KEY\$KEY
will escape the $KEY rather than expand${KEY:-default}
will first attempt to expand any env with the name KEY. If not one, then it will return default
npx awsu-cli exec -p profile -r eu-west-1 -- aws s3 ls
Clone the repo
npm run cli -- exec -p default -r eu-west-1 -- aws s3 ls