krakend / krakend-pubsub

a pubsub backend for the KrakenD framework
https://www.krakend.io
Apache License 2.0
10 stars 17 forks source link

Localstack support for AWS SQS pubsub #22

Open zcapper opened 1 year ago

zcapper commented 1 year ago

Hi,

I'd like to run and test my Krakend configuration locally, and as part of that use pubsub against a local SQS endpoint.

Currently, if I try to use a queue URL corresponding to a localstack instance on localstack:4566, it will still try to connect to an AWS endpoint (and log an InvalidClientTokenId error as a result).

"host": [
  "awssqs://localstack:4566/000000000000"
],
"extra_config": {
  "backend/pubsub/publisher": {
    "topic_url": "/SAMPLE-TASK?region=us-east-1"
  },

Ideally, KrakenD would either infer the AWS endpoint URL from the topic URL, or expose an AWS_ENDPOINT_URL environment variable so it can be manually overridden in local environments.