1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
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!
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor 3 Jahren
Can you log the "event" parameter? I think you should use "event.sourceIP"