Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying --endpoint-url gets an "Unable to find LocalStack endpoint for service" error #51

Closed
niauah opened this issue Feb 7, 2022 · 2 comments
Labels

Comments

@niauah
Copy link

niauah commented Feb 7, 2022

I was running a seperate testing Localstack host that exposes different ports with the docker-compose file like this:

version: "3.8"

services:
  localstack-testing:
    container_name: "${LOCALSTACK_DOCKER_NAME-localstack_testing}"
    image: localstack/localstack
    ports:
      - "127.0.0.1:5510-5559:4510-4559"  # <--Port number changed here
      - "127.0.0.1:5566:4566"            # <--Port number changed here
    environment:
      - LOCALSTACK_SERVICES=${SERVICES-}
      - DEBUG=${DEBUG-}
      - DATA_DIR=${DATA_DIR-}
      - LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR-}
      - HOST_TMP_FOLDER=${TMPDIR:-/tmp/}localstack
      - DOCKER_HOST=unix:///var/run/docker.sock
    volumes:
      - "${TMPDIR:-/tmp}/localstack:/tmp/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"

The Localstack service was started by docker-compose up command and went up normally.

When I tried the awslocal --endpoint-url http://localhost:5566/ help command, an error occured:
ERROR: Unable to find LocalStack endpoint for service "http://localhost:5566/"

However, when using aws instead of awslocal, the command was successfully executed and the help message was shown.

If any extra information is needed to reproduce the situation, please let me know.

@whummer
Copy link
Member

whummer commented Feb 7, 2022

Thanks for reporting @niauah . This is a bit of a limitation with the awslocal command line - the first parameter needs to include the service name, e.g., you can run this command:

awslocal s3 --endpoint-url http://localhost:5566/ help

So, for general help, please use aws help, and for service-specific help, you can use awslocal. Hope that helps, thanks.

@whummer whummer added the usage label Feb 7, 2022
@niauah
Copy link
Author

niauah commented Feb 7, 2022

Thanks for the reply! I can reproduce the result, and this solves my problem.

So, for general help, please use aws help, and for service-specific help, you can use awslocal.

I just tried awslocal help --endpoint-url http://localhost:5566 and it also works, suggesting that help is an acceptable first parameter.

@whummer whummer closed this as completed Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants