Skip to content

Typing

This typing utility provides static typing classes that can be used to ease the development by providing the IDE type hints.

Utilities Typing

LambdaContext

The LambdaContext typing is typically used in the handler method for the Lambda function.

Annotating Lambda context type
1
2
3
4
5
6
from typing import Any, Dict
from aws_lambda_powertools.utilities.typing import LambdaContext

def handler(event: Dict[str, Any], context: LambdaContext) -> Dict[str, Any]:
    # Insert business logic
    return event

Last update: 2021-12-30
Back to top