Awslocal "You must specify a region" error

Hello - I recently migrated to a new computer, and after installing the localstack cli, I am having trouble getting it to run. If I run any command against awslocal, for example ‘awslocal sqs list-queues’, I get the error “You must specify a region. You can also configure your region by running ‘aws configure’.”

I have a localstack profile specific in my credentials file, which looks like this (keys/secrets removed):
[default]
aws_access_key_id = …
aws_secret_access_key = …
[sandbox]
aws_access_key_id = …
aws_secret_access_key = …
[localstack]
aws_access_key_id = some_fake
aws_secret_access_key = access_key

and the corresponding configuration in my config file, which looks like this:
[default]
region = us-east-1

[profile localstack]
region = us-east-1
output = json
endpoint = http://localhost:4566

[profile sandbox]
region = us-east-1

I am running on Windows 10 on the latest version of localstack cli and the docker images. I did not have this problem on my previous laptop which was running the same (major) version of Windows.

I have searched high and low to figure out what is going on, but no luck so far. I’ve even uninstalled/reinstalled python and localstack but the issue persists.

For now, I’ve worked around it by creating an alias in bash (using the git bash mingw terminal) like so:
alias awsl=“aws --endpoint-url=http://localhost:4566

which seems to be working well, I just can’t use awslocal.

I get the same problem if I try to run awslocal in powershell or cmd.

Has anyone else run into this or resolved it?

Hi @cbristol,

I would suggest reinstalling the awslocal pip install -U awscli-local
For the configuration documentation please visit: AWS Command Line Interface | Docs (localstack.cloud)