Function gives 502 error when deployed to Netlify but executes fine locally

An update on this one. I was getting the same error from using optional chaining ?.

AWS Lambda now supports Node 14, but as per the instructions in this thread you need to set the environment variables in the UI to enforce it.

My functions now run with no code changes.

1 Like