#Capture API headers in Lambda function
3 messages · Page 1 of 1 (latest)
3 messages · Page 1 of 1 (latest)
I've seen a few folks capturing the IPs from the API headers and storing in the DB. Any hits on how to do that? I'm using a API that is proxy into my lambda function.
In your Lambda, you get it like this:
IP = event['requestContext']['identity']['sourceIp']
I ended up finding this worked after searching around. clientIP = event['headers']['X-Forwarded-For']