I have localstack running in a docker container and an application running on the host machine which connects to it via localhost:4566.
In localstack 2.0.2 when my application tried to get an SQS Queue URL, localstack would respond with something like http://localhost:4566/000000000000/MyMessage
However, after upgrading to 3.0.0 it returns something like http://sqs.eu-west-1.localstack:4566/000000000000/MyMessage instead.
Notice that the hostname is now localstack instead of localhost. So when my application tries to interact with that queue it fails, since my application isn’t running in the docker network.
Now, I could add 127.0.0.1 sqs.eu-west-1.localstack to /etc/hosts but that solution is less than ideal for several reasons.
Is there some way to configure localstack to behave more like it used to? Or some other approach to solving this that I’m not seeing?
There are multiple configuration options to configure how the URLs returned by SQS will look like. Check out our configuration docs for more information: Configuration | Docs
Your case is not actually the default behavior, so I’d guess you’re currently setting a networking configuration variable when starting localstack, which affects how URLs are returned.