Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I integrate Amazon SQS with Dynamodb

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.

like image 772
ramprasathrajendran Avatar asked Aug 05 '13 14:08

ramprasathrajendran


People also ask

Can SQS write to DynamoDB?

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.

Does Amazon run on DynamoDB?

Amazon DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-Region replication, in-memory caching, and data import and export tools.


2 Answers

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.)

like image 157
prestomation Avatar answered Sep 18 '22 14:09

prestomation


Yes I agree Hyangelo, you can do this with Simple Workflow Service (SWF).

SWF will give you a control feature over your application enabling you to distribute and execute different services or tasks when you want.

Here is the link to the documentation: http://aws.amazon.com/swf/

like image 37
user2816726 Avatar answered Sep 20 '22 14:09

user2816726