Skip to content

Instantly share code, notes, and snippets.

@gunlee01
Last active December 20, 2016 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gunlee01/d7425734f4310f7d9993fc613ed93a28 to your computer and use it in GitHub Desktop.
Save gunlee01/d7425734f4310f7d9993fc613ed93a28 to your computer and use it in GitHub Desktop.
http logging lambda
'use strict';
exports.handler = (event, context, callback) => {
console.log("[EventLog-ByLineCall]");
console.log(event);
const done = (err, res) => callback(null, {
statusCode: err ? '400' : '200',
body: err ? (err.message || err) : JSON.stringify(res),
headers: {
'Content-Type': 'application/json',
},
});
done(null, "ok");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment