AWS API GatewayからDynamoDBテーブルに直接データを書き込む場合、
API Gatewayのマッピングテンプレートを使います。その場合、リモートIPやUserAgentを取得するには$contextを利用し
テンプレートを下記のように記述します
{
"TableName": "テーブル名",
"Item": {
"sourceIp": {"S": "$context.identity.sourceIp" },
"requestTime": {"S": "$context.requestTime"},
"userAgent": {"S": "$context.identity.userAgent"},
"hoge": {
"S": "$input.params('hoge')"
}
}
}

