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

Protocol now required when using custom.localstack.host #257

Open
bram-tv opened this issue Jun 24, 2024 · 1 comment
Open

Protocol now required when using custom.localstack.host #257

bram-tv opened this issue Jun 24, 2024 · 1 comment

Comments

@bram-tv
Copy link

bram-tv commented Jun 24, 2024

Description

Since serverless-loaclstack v1.2.1 it appears that the protocol needs to be included in the custom.localstack.host property.
In older versions it appears this was not required.

Configuration

In our serverless configuration we had something similar to:

custom:
  localstack:
    host: ${env:SOME_VAR, '127.0.0.1'}

i.e. without the protocol (http://).

serverless-localstack v1.2.0:

Using this with:

  • serverless: v3.36.0 (using an older version to be able test with older plugin versions)
  • serverless-localstack: v1.2.0

The debug output shows:

Reconfiguring service acm to use http://127.0.0.1:4566
Reconfiguring service amplify to use http://127.0.0.1:4566
Reconfiguring service apigateway to use http://127.0.0.1:4566

serverless-localstack v1.2.1:

Using this with:

  • serverless: v3.36.0 (using an older version to be able test with older plugin versions)
  • serverless-localstack: v1.2.1

The debug output shows:

Reconfiguring service acm to use 127.0.0.1://127.0.0.1:4566
Reconfiguring service amplify to use 127.0.0.1://127.0.0.1:4566
Reconfiguring service apigateway to use 127.0.0.1://127.0.0.1:4566

which then results in errors such as:

aws: [1] { UnknownEndpoint: Inaccessible host: `127.0.0.1' at port `443'. This service may not be available .....

Additional information

In the documentation the example does include the protocol when setting the custom.localstack.host so I suppose it can also be seen as a configuration error on our end.. but in that case a clearer error message might be useful.

I'm also guessing the change in behavior is caused by #243

@steffyP
Copy link
Member

steffyP commented Jul 12, 2024

Thanks for reporting! Agreed that a clear error message would be great in that case.
Sorry for the inconvenience. But it seems you are able to solve the issue with providing the protocol :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants