Proof of concept to demonstrate how to use aws-cli and localstack with docker.
$ docker-compose up -d
alias aws='docker run --rm -it -v ~/.aws:/root/.aws -v $(pwd):/aws amazon/aws-cli'
# add `--net=host` and `--endpoint-url http://localhost:4566` to use localstack
alias aws='docker run --rm -it -v ~/.aws:/root/.aws -v $(pwd):/aws --net=host amazon/aws-cli --endpoint-url http://localhost:4566'
aws s3 mb s3://poc
aws s3 ls
If you have any feedback, please contact me at raphaeldias.ti@gmail.com