I borrowed a script from this article, Serving custom headers from static sites on CloudFront_S3 with Lambda@Edge, and decided I’d like to have tools setup locally to troubleshoot such a script. This article suggests some of the steps I took.

brew unlink node
brew install node@6
brew link node@6
npm install lambda-tester mocha chai --save-dev

Here is the test file.

And here is a handler script that passes this test.

Here are some links for further reading.