Bug: `log_uncaught_exceptions` only works locally and not on lambda
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- aws, python
Línea de trabajo
Start by locating the documentation for Logger(log_uncaught_exceptions=True) and reviewing the discussion about why the behavior differs in AWS Lambda. Reproduce the provided handler in an actual Lambda runtime and compare its output with local execution. The change is complete when the documentation clearly states which environments support this option and explains the observed unstructured output; confirm the project’s documentation build or relevant checks if available.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Expected Behaviour
When log_uncaught_exceptions=True, uncaught exceptions in a lambda are handled and transformed to a structured log.
Current Behaviour
Uncaught exceptions are printed unstructured.
Code snippet
from aws_lambda_powertools import Logger
from aws_lambda_powertools.utilities.typing import LambdaContext
logger = Logger(log_uncaught_exceptions=True)
def lambda_handler(event: dict, context: LambdaContext) -> str:
raise(Exception("asdf"))
Possible Solution
Probably none. Document this behavior.
I don't think sys.excepthook can be overridden in a lambda container, but I have no proof because the original forum thread that details this has been deleted by AWS with no replacement.
Steps to Reproduce
Set log_uncaught_exceptions=True in an actual running lambda. If log_uncaught_exceptions=True on a local machine, the behavior runs just as intended.
AWS Lambda Powertools for Python version
latest
AWS Lambda function runtime
3.9
Packaging format used
Lambda Layers
Debugging logs
No response
- Lenguaje dominante
- Python
- Estrellas
- 3.3k
- Forks
- 511
- Merge medio
- 3 d 8 h
- PR fusionados (30 d)
- 92
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws-powertools/powertools-lambda-python
-
Bug: POWERTOOLS_IDEMPOTENCY_DISABLED set to an empty or non-boolean value crashes every invocationPosiblemente ocupada @lechakrawarthy la tomó hace 1 día. Abiertobug good first issue help wanted idempotency
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
aws-powertools/powertools-lambda-python#8728 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Bug: Redis layer fails the invocation instead of retrying when a record expires between SET NX and GETPosiblemente ocupada @coughlmao la tomó hace 1 día. Abiertobug good first issue help wanted idempotency
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
aws-powertools/powertools-lambda-python#8727 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Bug: Redis orphan lock timeout ignores expires_after_seconds and is always 10 secondsPosiblemente ocupada @CJstate la tomó hace 1 día. Abiertobug good first issue help wanted idempotency
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
aws-powertools/powertools-lambda-python#8726 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Bug: idempotency payloads with set, frozenset or bytes fields cannot be hashedPosiblemente ocupada @Neeraj111010 la tomó hace 1 día. Abiertobug good first issue help wanted idempotency
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
aws-powertools/powertools-lambda-python#8725 · 6 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Bug: with a DynamoDB composite key, DataRecord.idempotency_key is the static partition key valuePosiblemente ocupada @sumedh-aerram la tomó hace 1 día. Abiertobug good first issue help wanted idempotency
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
aws-powertools/powertools-lambda-python#8724 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de aws-powertools/powertools-lambda-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
elviskahoro/sdk-python-attio#144 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
RenyiELBO raises TypeError when model has no sample sitesPosiblemente ocupada @alibb007 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Four evaluation scripts unpack init_memmachine_params's five return values into three namesAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
MemMachine/MemMachine#1911 ·
Los mantenedores suelen responder en 3 días