Amazon web services 返回λ';api网关响应正文中的s context.requestId超时

Amazon web services 返回λ';api网关响应正文中的s context.requestId超时,amazon-web-services,aws-lambda,aws-api-gateway,Amazon Web Services,Aws Lambda,Aws Api Gateway,在使用ApiGateway lambda集成时,我需要将lambda的上下文请求Id返回给客户端。我在ApiGateway->Gateway Responses->Integration Timeout->Response Templates中尝试过这个方法 {“message”:$context.error.messageString,“request_id”:$context.awsEndpointRequestId,“request_id_2”:$context.requestId} 但是

在使用ApiGateway lambda集成时,我需要将lambda的上下文请求Id返回给客户端。我在ApiGateway->Gateway Responses->Integration Timeout->Response Templates中尝试过这个方法

{“message”:$context.error.messageString,“request_id”:$context.awsEndpointRequestId,“request_id_2”:$context.requestId}

但是,响应正文中仅显示$context.requestId,而不是$context.awsEndpointRequestId

如果ApiGateway超时,awsEndpointRequestId(我假设它是lambda上下文请求id)是否不可用