Skip to content

Instantly share code, notes, and snippets.

@robertoduessmann
Last active September 13, 2018 01:10
Show Gist options
  • Select an option

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

Select an option

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