Every Lambda function I write starts in the same way: a bunch of code to unpack the event and then validate its contents. Sound familiar?
Moreover, I can never remember the exact key names for certain event payloads. How do I get the headers from an ApiGateway
event again? Is it headers
or Headers
?
Oh right, it’s headers
andmultiValueHeaders
. Of course it is.
So each new Lambda function I create starts off in a very similar way to every other Lambda function I create:
json.loads
to turn strings into dicts.#serverless #aws-lambda #aws #python