Small trick on how to find out AWS payload for lambda for event
Recently i was writing a lot of different microservices using AWS Lambda. And for quite some time i was strugling to understand what will be the payload that my lambda will receive. Well, only in cases when this payload was coming from other AWS resources, of course :) Anyway, after quite some time i found a really noob tip that saves me now a lot of time :). Here's what you need to do :
- Open your AWS console
- Go to
Lambda
section - Find yours or any other lambda
- Next to
Test
button there's a configuration for try out events - Click
Configure test events
- Start typing in the events examples!.
That's it. I can't believe that i didn't think about it before - it gives you an example of payload from other services ( ApiGateway, SNS etc).