Setting up SQS locally
SQS will be used in order to notify us when a DynamoDB entry has been created. The REST-based Lambda application will send a message in SQS.
elasticmq
is a very popular SQS emulator tool (https://github.com/softwaremill/elasticmq), which covers most of the features provided by SQS.
In order to push data to SQS, a queue should be created. elasticmq
provides us with the option to create a queue on initialization.
The configuration will be the following:
//sqs.conf include classpath("application.conf") queues { subscription-event{} }
Let’s now add the elasticmq
configuration to our Compose file:
services: sqs: image: softwaremill/elasticmq ports: - 9324:9324 - 9325:9325 networks: - aws-internal volumes: ...