How do I integrate Amazon SQS with Dynamodb

ramprasathrajendran picture ramprasathrajendran · Aug 5, 2013 · Viewed 11.2k times · Source

Is it possible to auto send/push the messages in Amazon SQS to DynamoDB? I wish to send my messages to SQS and for period of time I want to send this to DynamoDB. Another service should fetch the DynamoDB table and send it as email using SES.

Kindly help me out to achieve this. I will be using it for the User notification purpose from a Social networking site.

Thanks.

Answer

prestomation picture prestomation · Aug 5, 2013

There is no AWS mechanism to automatically publish SQS messages to DynamoDB; but you can use an AWS Lambda event source mapping to automatically pull SQS messages and invoke a Lambda function, and it's pretty straightforward to write a Lambda function that writes those messages to DynamoDB. (Here's an example using Node.js: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/dynamodb-example-table-read-write.html.)