Created
September 5, 2018 20:47
-
-
Save robertoduessmann/d54d24491f1b15d5f39b36193b3d909f 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
| let sqs = new AWS.SQS({ | |
| region: 'us-west-2' | |
| }); | |
| let params = { | |
| MessageBody: JSON.stringify(event.body), | |
| QueueUrl: SQS_URL | |
| }; | |
| sqs.sendMessage(params, function(error, data) { | |
| if (error) { | |
| console.error('Fail to send message' + error); | |
| } else { | |
| console.info('Message sent successfully:', data.MessageId); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment