Include request IP address on event object

Here is a quick and simple debug handler function to help you easily see what the event and context values contain in the logs. In your case you should be able to get the IP through event.headers.client-ip.

my-debug-handler.js

exports.handler = function(event, context, callback) {
  console.log(`{\ncontext: ${JSON.stringify(context,null,2)},\nevent: ${JSON.stringify(event,null,2)}\n}`)
  callback(null, {
  statusCode: 200,
  body: `Your IP address ${event.headers['client-ip']}`
  });
}

Note: This is a method I would use to test event.body and event.queryStringParameters values when debugging functions.