这是
$context.identity.sourceIp在Lambda函数中使用API网关的简单演示。
API映射模板:
{ "sourceIP" : "$context.identity.sourceIp"}Lambda函数:
'use strict';console.log('Loading function');exports.handler = (event, context, callback) => { console.log('SourceIP =', event.identity.sourceIP); callback(null, event.identity.sourceIP);};


