I am using Celery w. dynamoDB backend. The way to configure the dynDB endpoint in Celery is intercepted by localstack and localhost is injected instead.
Reading the code, I've found the environment variable LOCALSTACK_HOST that can be used for this purpose, I believe it is worth mentioning that variable somewhere in the README.