Logging

Lambda Web Adapter supports Lambda's Advanced Logging Controls. Configure log level and format through the Lambda console, API, or CLI under Monitoring and operations tools > Logging configuration.

Environment Variables

VariableDescriptionDefault
AWS_LAMBDA_LOG_LEVELLog level: DEBUG, INFO, WARN, ERROR. Takes precedence over RUST_LOGINFO
AWS_LAMBDA_LOG_FORMATLog format: JSON or TEXTTEXT

You can also set RUST_LOG as a fallback if AWS_LAMBDA_LOG_LEVEL is not configured.

JSON Logging

When log format is set to JSON, log entries are formatted as JSON objects, making them easier to query with CloudWatch Logs Insights.