Dean Schulze
Aug 26, 2017 · 1 min read

Why do you say that lambda functions must return a JSON map? There are lots of examples of Lambda functions that return Strings. Here is an example that works when deployed and configured manually

The same example gives a 502 Bad Gateway error if I deploy it with the serverless-application-model, though

I haven’t figured out what SAM is missing, but maybe it is related to the lambdas returning a String instead of a JSON map.

)
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade