Many months ago Netlify released Netlify Functions which provides most of AWS Lambda's functionality within the Netlify Continuous Deployment platform.
When I first started playing with Functions I was impressed at how simple they had been able to make it and realised that with this I could deploy almost any product imaginable with ease. In addition to Functions, they'd written a neat tool called netlify-lambda which could help you bundle your functions for deployment and also serve them locally for development!
Almost immediately after starting to use netlify-lambda I was running into issues trying to maintain cohesion between my local, staging and production environments. The issue wasn't that netlify-lambda didn't do what it said it would, but Functions was only one of several features I was using on Netlify.
Netlify supports a bunch of additional features which you can configure with a file called
netlify.toml, but none of those other features had local helpers like netlify-lambda. This means you need to write your own development tools and servers to replicate them which is fine for one application but once you're working on several it becomes rather unpleasant. The obvious solution to this would be to write another package, like netlify-lambda but for everything… so I did!
The package is called netlify-local and is available on NPM, in simple terms it will read your
netlify.toml configuration and try it's best to provide 1:1 emulation of the options you're using. It also supports passing in Webpack configurations for rebuilding when something changes.
There's still quite a bit to implement before all features are 1:1 compatible but progress is being made every day and for most people it should work right out the box.