Message Queues Made Simple with SQS, Lambda, NodeJS, and Serverless

A quick guide to setting up a Lambda function to receive messages from an SQS messaging queue with the Serverless Framework.

Image for post
Image for post
Made by the author in Canva

SQS

Image for post
Image for post
Screenshot by the author

Lambda

Image for post
Image for post
Screenshot by the author

Serverless Example

$ npm install -g serverless
$ serverless
Image for post
Image for post
Screenshot by the author
Image for post
Image for post
Screenshot by the author
$ serverless config credentials --provider aws --key YOUR_KEY_HERE --secret YOUR_KEY_SECRET_HERE
[default]
aws_access_key_id=YOUR_KEY_HERE
aws_secret_access_key=YOUR_SECRET_KEY_HERE
$ serverless deploy
Image for post
Image for post
Screenshot by the author
Image for post
Image for post
Screenshot by the author
Image for post
Image for post
Screenshot by the author
"{"file_id":"0f28f8f8-edcd-4824-8f3c-d1b888dda9ce"}"
Image for post
Image for post
Screenshot by the author
Image for post
Image for post
Screenshot by the author
Image for post
Image for post
Image for post
Image for post
Screenshots by the author
Image for post
Image for post
Image for post
Image for post
Screenshot by the author
$ serverless remove

Written by

I am the Director of I.T. at IN10T. My passions include software development, anything technology related, and cars.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store