https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-docker.html
I usually would use brew
to install awscli
but I've switched to the docker variant.
Benefits:
- no need to install dependencies
- isolates aws configuration to a volume or directory
Script that I use in project:
#!/usr/bin/env sh
# file: aws
docker run --rm -it \
-v some_aws_config:/root/.aws \ # this creates the docker volume some_aws_config
-v $(pwd):/aws amazon/aws-cli \
"$@" # propagate all parameters here
So I can use ./aws --version