How IP addresses get logged when using Lambda and API Gateway

0

A customer is asking if IP addresses get logged when using Lambda and API Gateway? He mentioned that this is important for them to be GDPR compliant once the new regulation comes into force. Thank you!

preguntada hace 6 años4529 visualizaciones
1 Respuesta
1
Respuesta aceptada

You can enable Amazon CloudWatch Logs to trace API calls. Once enabled, API Gateway will log API calls in CloudWatch. The API gateway access log will have the information of the IP address "ip": "$context.identity.sourceIp":

https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html

Or check the value of "X-Forwarded-For" if you want to build a function in API Gateway by using Lambda Proxy integration:

https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html

MODERADOR
respondido hace 6 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas