Skip to content

Instantly share code, notes, and snippets.

View anthonyroach's full-sized avatar

Anthony Roach anthonyroach

  • ICON
  • Indianapolis, IN
View GitHub Profile
@anthonyroach
anthonyroach / example-error.js
Created May 16, 2018 19:52 — forked from IronSavior/example-error.js
Require AWS Lambda handler to invoke callback before exit (prevent Node exit until handler invokes callback)
const lambda_handler = require('lambda-handler');
exports.handler = lambda_handler(( event, ctx, done ) => {
// This will log a handled error to CloudWatch and return the error to AWS Lambda
throw 'BOOM!';
});