9

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.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470

4 Answers4

5

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

ruakh
  • 175,680
  • 26
  • 273
  • 307
prestomation
  • 7,225
  • 3
  • 39
  • 37
1

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/

0

Sounds like a workflow system from how you describe what you want, have you considered Simple Workflow Service?

Hyangelo
  • 4,784
  • 4
  • 26
  • 33
0

SQS can't be processed w/o pulling messages. You can either use SWF to solve your use-case OR use SNS.

SNS<=>SQS binding is free by AWS. Send your messages to SNS, bind your SNS with SQS & lambda-function.

On triggering lambda function - you can create dynamodb-record and send it to another SNS2.

Bind SNS2 <=> SES which will trigger the email.

checkout: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-sns-ses-dynamodb/

shahjapan
  • 13,637
  • 22
  • 74
  • 104