Description
If you installed both the localstack
and awscli
docker containers, you might reasonably expect docker --run -it amazon/aws-cli --endpoint-url http://localhost:4566 s3 mb s3://mytestbucket
to create a bucket in your localstack container.
This does not work. It does not work because the container running amazon/aws-cli
is isolated from 0.0.0.0:4566
on the host machine which means that aws-cli
cannot reach localstack
through your shell.
PSA: The simplest solution is to install AWSCLI v2 onto your host machine instead of using it from a container.
There are other solutions, no doubt, but this solution should be simple enough for people searching for this issue from the Internet.
It would be lovely if this tip were included somewhere in the README.md.