Title: Error logging is incompatible with Lambda Advanced Logging Controls · Issue #202 · aws/aws-lambda-python-runtime-interface-client · GitHub
Open Graph Title: Error logging is incompatible with Lambda Advanced Logging Controls · Issue #202 · aws/aws-lambda-python-runtime-interface-client
X Title: Error logging is incompatible with Lambda Advanced Logging Controls · Issue #202 · aws/aws-lambda-python-runtime-interface-client
Description: For Lambdas configured to log in JSON (_AWS_LAMBDA_LOG_FORMAT == LogFormat.JSON), error log messages contain the property "log_level": "ERROR". If the Lambda is configured to use log-level filtering the filtering doesn't work as expected...
Open Graph Description: For Lambdas configured to log in JSON (_AWS_LAMBDA_LOG_FORMAT == LogFormat.JSON), error log messages contain the property "log_level": "ERROR". If the Lambda is configured to use log-level filterin...
X Description: For Lambdas configured to log in JSON (_AWS_LAMBDA_LOG_FORMAT == LogFormat.JSON), error log messages contain the property "log_level": "ERROR". If the Lambda is configured to us...
Opengraph URL: https://github.com/aws/aws-lambda-python-runtime-interface-client/issues/202
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error logging is incompatible with Lambda Advanced Logging Controls","articleBody":"For Lambdas configured to log in JSON (`_AWS_LAMBDA_LOG_FORMAT == LogFormat.JSON`), error log messages contain [the property `\"log_level\": \"ERROR\"`](https://github.com/aws/aws-lambda-python-runtime-interface-client/blob/f11e7c5c5cc7caf7a44263d3978e0dfda4f15250/awslambdaric/bootstrap.py#L111). If the Lambda is configured to use [log-level filtering](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs-log-level.html) the filtering doesn't work as expected because the log-level filtering feature makes the assumption that the message contains the JSON property `level` (not `log_level`). Lambda will assign the log output the level `INFO` to messages with missing (or invalid) `level` property, i.e. all messages created by the awslambdaric function `log_error` are no longer considered errors because the property `log_level` is simply ignored by Lambda.\n\nHence, if we use log-level filtering and set the level to `WARN` (a pretty common config for production) **all error log messages created by awslambdaric (most notably uncaught handler errors) are missing in CloudWatch** because they are wrongly attributed the (default) log level `INFO`.\n\nWe should either add the property `level` to the `error_result` or replace the property `log_level` with `level` in the `error_result` created by [`log_error(...)` ](https://github.com/aws/aws-lambda-python-runtime-interface-client/blob/f11e7c5c5cc7caf7a44263d3978e0dfda4f15250/awslambdaric/bootstrap.py#L111).","author":{"url":"https://github.com/faberchri","@type":"Person","name":"faberchri"},"datePublished":"2026-04-27T20:54:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/202/aws-lambda-python-runtime-interface-client/issues/202"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f2fdfd44-1518-26d2-7762-b29960c45591 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1AE:30B53D:31B14BB:330B1B0:6A63281A |
| html-safe-nonce | fbd8a8397269a057959b869cb10a8c6d0e2cb0076882249395d319b99407b8cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUFFOjMwQjUzRDozMUIxNEJCOjMzMEIxQjA6NkE2MzI4MUEiLCJ2aXNpdG9yX2lkIjoiNjQyNjgyMjAzNjUzNjEwOTA4MiIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | bca6a79b9166b18ad01789cb0945b98442e0870c30cf80ea3c9c49095c4e728d |
| hovercard-subject-tag | issue:4338819492 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aws/aws-lambda-python-runtime-interface-client/202/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7dd9e91b8e257550d89553d924c2d86a5ab4628bc574bcfd88ede72a559d2549/aws/aws-lambda-python-runtime-interface-client/issues/202 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7dd9e91b8e257550d89553d924c2d86a5ab4628bc574bcfd88ede72a559d2549/aws/aws-lambda-python-runtime-interface-client/issues/202 |
| og:image:alt | For Lambdas configured to log in JSON (_AWS_LAMBDA_LOG_FORMAT == LogFormat.JSON), error log messages contain the property "log_level": "ERROR". If the Lambda is configured to use log-level filterin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | faberchri |
| hostname | github.com |
| expected-hostname | github.com |
| None | 30c644d502bce6cd2e59f9000b4744f2b64819abea8e8f959b18e3ad793125aa |
| turbo-cache-control | no-preview |
| go-import | github.com/aws/aws-lambda-python-runtime-interface-client git https://github.com/aws/aws-lambda-python-runtime-interface-client.git |
| octolytics-dimension-user_id | 2232217 |
| octolytics-dimension-user_login | aws |
| octolytics-dimension-repository_id | 292411453 |
| octolytics-dimension-repository_nwo | aws/aws-lambda-python-runtime-interface-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 292411453 |
| octolytics-dimension-repository_network_root_nwo | aws/aws-lambda-python-runtime-interface-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 331492a48ebd91d66ef2de38e1901bb911c9fe9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width