Accessing localstack from another computer

Viewed 24

I have localstack running on a Kali Linux box. I have added an aws S3 service. I can access the service using: aws --endpoint-url=http://localhost:4566 s3 ls

if I try the same command using the machines IP address I get a message:

Could not connect to the endpoint URL: "http://10.xxx.xxx.xxx:4566/"

My docker-compose.yaml file looks like:

version: "3.8"

services:
  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
    image: localstack/localstack
    ports:
      - "127.0.0.1:4566:4566"            # LocalStack Gateway
      - "127.0.0.1:4510-4559:4510-4559"  # external services port range
      - "127.0.0.1:53:53"                # DNS config (only required for Pro)
      - "127.0.0.1:53:53/udp"            # DNS config (only required for Pro)
      - "127.0.0.1:443:443"              # LocalStack HTTPS Gateway (only required for Pro)
    environment:
      - DEBUG=${DEBUG-}
      - PERSISTENCE=${PERSISTENCE-}
      - LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR-}
      - LOCALSTACK_API_KEY=${LOCALSTACK_API_KEY-}  # only required for Pro
      - DOCKER_HOST=unix:///var/run/docker.sock
      - HOSTNAME_EXTERNAL-localstack
    volumes:
      - "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"
networks:
 default:
   external: true
   name: localstack

I am not sure how to tell localstack to be available by the machine's IP address instead of just localhost.

Thank in advance for the help.:

0 Answers
Related