Rough idea of how to make your Node.js Lambda functions compatible with v2 and v3 SDKs.
Not terrible. Not great either.
https://gist.github.com/brianleroux/54608be57a8a5e7484113b89d9b4537e
The v3 SDK is pretty clearly designed to be used with webpack or something like it.
Problem is, using a bundler with Node.js is a bad practice if you care about meaningful errors. Which we do.
Ideally we didn't have bugs and errors in our code but planning for that to not happen is a bad plan ! Debugging without meaningful stack traces is terrible DX.
Does node not have anything equivalent to source maps?
(Says someone who has no idea how to set up & use source maps properly...)
@brianleroux @AmeliaBR Firefox source map / debug has been broken for years... (ex https://bugzilla.mozilla.org/show_bug.cgi?id=1700600 with full repo code)
And on a vendors own platform with their own SDK should be totally unnecessary.
I live by stack traces. Key debugging tool.
@falken @AmeliaBR at least there's options in browsers… when people do this to themselves in Node its baffling to me.