Is it possible to log the $input variable (body variables) of a request to API Gateway from CloudWatch?
The Log format of the Custom Access Logging doesn't seem to accept $input.body or any of the other $input functions:
{"requestId": "$context.requestId", "ip": "$context.identity.sourceIp", "caller": "$context.identity.caller", "user": "$context.identity.user", "requestTime": "$context.requestTime", "httpMethod": "$context.httpMethod", "resourcePath": "$context.resourcePath", "status": "$context.status", "protocol": "$context.protocol", "responseLength": "$context.responseLength", "body": "$input.body", params: "$input.params()"}
You can use $context variables in the access logging as documented in
https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html.
Other variables including $input are not supported. If you want to log the request/response header values, you can use execution logging with enabling 'Log full requests/responses data'.