Multiple services sharing same SNS (localstack)
See original GitHub issueHi, thanks for this great plugin!
I have two services isolated, each with its serverless.yaml file. Im using localstack. I had to set the port differently for each service to make them work in parallel. I will be adding more services, so each will have to be on a different port, right? Is there a way to prevent this?
Also, the HOST IP ADDRESS (sns-subscribe-endpoint) has to be set for each computer, is there a way to use localhost or something?
Thanks!
Service A:
serverless-offline-sns:
port: 4003
host: 0.0.0.0 # Enable plugin to listen on every local address
sns-subscribe-endpoint: 192.168.0.107 # Host ip address
sns-endpoint: http://localhost:4575 # Default localstack sns endpoint
debug: true
region: ${self:provider.region}
Service B:
serverless-offline-sns:
port: 4002
host: 0.0.0.0 # Enable plugin to listen on every local address
sns-subscribe-endpoint: 192.168.0.107 # Host ip address
sns-endpoint: http://localhost:4575 # Default localstack sns endpoint
debug: true
region: ${self:provider.region}
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Using Localstack SNS and SQS for local testing - Medium
Let's say we have two microservices, order service and delivery service. ... LocalStack can be used to test various AWS services like S3,...
Read more >SQS SNS Subscription between two different Localstack ...
I have two different set of Services. Each service set has a Localstack container running. Can an SQS created in one Localstack service...
Read more >Configuration - LocalStack Docs
LocalStack allows for many different configuration options. ... e.g., services are started in different containers using docker-compose.
Read more >Spring Cloud Messaging With AWS and LocalStack - Auth0
Setting up LocalStack is dead simple; you just need to use the docker-compose file below, and it will start SNS and SQS services...
Read more >Using LocalStack for AWS SNS Mule Connector - YouTube
GitHub Repo LocalStack : https://github.com/localstackMuleSoft AWS Simple Queue Services Connector: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For the sns-subscribe-endpoint i did this:
sns-subscribe-endpoint: ${env:DEV_LOCAL_IP, 'host.docker.internal'} # Host ip address
On OSX no need for DEV_LOCAL_IP on the env, but on linux, yes.
@chasevida @falecci
What worked for me was to setup a sls offline local sns service bridge
local-sns.yaml
then on the other services yamls