Last active
September 13, 2018 01:10
-
-
Save robertoduessmann/8cfcf916903784a1e8d50904507339a5 to your computer and use it in GitHub Desktop.
Lambda script to integrate with SQS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWS.config.update({ | |
| accessKeyId: 'KEY_ID', | |
| secretAccessKey: 'ACCESS_KEY' | |
| }); | |
| let sqs = new AWS.SQS(); | |
| function processEvent(event, context, callback) { | |
| function processMessage() { | |
| let params = { | |
| MessageBody: JSON.stringify(event.body), | |
| QueueUrl: 'https://sqs.REGION.amazonaws.com/' | |
| }; | |
| sqs.sendMessage(params, function(error, data) { | |
| //validations and return | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment