Skip to content

Instantly share code, notes, and snippets.

@bmccann36
Last active October 11, 2020 14:02
Show Gist options
  • Save bmccann36/4f6417f5c4e7372599db658629e4c2b6 to your computer and use it in GitHub Desktop.
Save bmccann36/4f6417f5c4e7372599db658629e4c2b6 to your computer and use it in GitHub Desktop.
example of invoking a Lambda function from Javascript api
const params = {
FunctionName: "my-function", InvocationType: "Event", Payload: "<Binary String>", Qualifier: "1"
};
lambda.invoke(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment