Trace full-request / response bodies in AWS ApiGateway (not truncated)

房东的猫 提交于 2020-03-23 07:34:09

问题


I am using AWS Api Gateway and I'd like to trace full request and response. Some of my integrations are lambdas and some other http endpoints.

I enabled stage > Logs > "Log full requests/responses data" and I can see logs on CloudWatch.

This seemed to be perfect until I discovered bodies were being TRUNCATED... There is a limitation of 1024 bytes in ApiGateway sending logs to cloudwatch.

Is there any solution to this?

I am considering using a lambda as a proxy (with http-proxy) as my last option...

Thanks


回答1:


As you stated, there is no current known solution to this problem and AWS is aware of the problem.

API Gateway currently limits log events to 1024 bytes. Log events larger than 1024 bytes, such as request and response bodies, will be truncated by API Gateway before submission to CloudWatch Logs.

You can see additional known issues at the AWS documentation page for API Gateway here.

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html



来源:https://stackoverflow.com/questions/50365298/trace-full-request-response-bodies-in-aws-apigateway-not-truncated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!