1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
It depends on which API you are using. If you are using HTTP API, the source IP is at event.requestContext.http.sourceIP
or event.headers.x-forwarded-for. If you are using REST API it will be in event.headers.X-Forwarded-For
or event.requestContext.identity.sourceIp
. You are trying to access event.identity.sourceIP
.
Note, in both cases you do not need a mapping template, just return a body from the Lambda function. If you are using REST API, you may be able to implement it using a Mock integration and a mapping template, although I did not test it.
understood. Thank you!
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 4 mois
- AWS OFFICIELA mis à jour il y a 2 ans
Can you log the "event" parameter? I think you should use "event.sourceIP"