Skip to content

Is it possible to set the SQS consumer queue to LocalStack? #361

Answered by nicholasgriffintn
debnon asked this question in Help
Discussion options

You must be logged in to vote

It is yes!

You'll need to configure an SQS Client as well, like so:

https://github.com/bbc/sqs-consumer/blob/main/test/features/utils/consumer/handleMessage.js

Which imports this from the file ../sqs:

const sqsConfig = {
  region: 'eu-west-1',
  endpoint: 'http://localhost:4566',
  credentials: {
    accessKeyId: 'key',
    secretAccessKey: 'secret'
  }
};

exports.sqs = new SQSClient(sqsConfig);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@debnon
Comment options

Answer selected by nicholasgriffintn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants