Skip to content

Instantly share code, notes, and snippets.

@robertoduessmann
Created September 5, 2018 20:47
Show Gist options
  • Select an option

  • Save robertoduessmann/d54d24491f1b15d5f39b36193b3d909f to your computer and use it in GitHub Desktop.

Select an option

Save robertoduessmann/d54d24491f1b15d5f39b36193b3d909f to your computer and use it in GitHub Desktop.
Lambda script to integrate with SQS
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