1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
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!
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
Can you log the "event" parameter? I think you should use "event.sourceIP"