Skip to content
/ snssqs Public
forked from markcallen/snssqs

Simple NodeJS AWS SNS and SQS example

License

Notifications You must be signed in to change notification settings

brygom/snssqs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SNS/SQS Example

This is an example of how to use AWS SNS and SQS to publish messages to a topic(SNS) and consume them from a queue(SQS) using NodeJS and the aws-sdk.

Prep

Log into your AWS console and create a new user in IAM. Make sure you save the users credientials. Attach the User Policies for Amazon SQS Full Access and Amazon SNS Full Access.

Create ~/.aws/credentials

Add the access key and secret access key for the IAM user you just created.

[snssqs]
aws_access_key_id = <YOUR_ACCESS_KEY_ID>
aws_secret_access_key = <YOUR_SECRET_ACCESS_KEY>

Install Packages

npm install

Create Topic and Queue

AWS_PROFILE=snssqs node create.js 

Run

Publish

AWS_PROFILE=snssqs node publish.js 

Consume

AWS_PROFILE=snssqs node consume.js 

About

Simple NodeJS AWS SNS and SQS example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%