Open indrabasak opened 1 year ago
Hi @indrabasak,
currently we do not have a patch for the serverless-domain-manager
plugin. There is also an open request for localstack support for their project.
As a workaround, you could try using the endpoint_url
configuration in the .aws/config
file, you can find details in the official AWS docs.
You could use it e.g. by changing the default
profile to be the LocalStack endpoint. Depending on your use case this might be a suitable workaround:
[default]
region = us-east-1
endpoint_url=http://127.0.0.1:4566
Note that we experienced issues with resolving the hostname localhost
with newer nodeJS versions, as it would resolve to an IPv6 address by default, but the Localstack container may not be listening on IPv6 (that's why in the sample snippet you see 127.0.0.1
).
Please let us know if this configuration works for you.
Hi @indrabasak,
could you please provide an update on this issue, e.g. does the proposed solution work for you?
I'm using the
serverless-domain-manager
plugin to create a custom domain for my API Gateway. The deployment tolocalstack
fails asserverless-domain-manager
plugin usesaws-sdk-js-v3
. During deployment, the plugin tries to connect to the AWS default endpoint. Is there a way of configuring the correct local stack endpoint? Here's the exception stack I encountered,Here's the code logic from the plugin logic,
The only thing missing is the
endpoint: 'http://localhost:4566'
during the instantiation ofAPIGatewayClient
.