Skip to content

API Gateway Structured Logging

Level: Warning

Initial version: 0.1.3

cfn-lint: WS2001

tflint (REST): aws_api_gateway_stage_structured_logging

tflint (HTTP): aws_apigatewayv2_stage_structured_logging

You can customize the log format that Amazon API Gateway uses to send logs. Structured logging makes it easier to derive queries to answer arbitrary questions about the health of your application.

Why is this a warning?

The rule in serverless-rules only checks if the structured log is JSON-formatted.

While CloudWatch Logs Insights will automatically discover fields in JSON log entries, you can use the parse command to parse custom log entries to extract fields from custom format.


See the implementations for Logging on API Gateway.

See also