--- id: aws-lambda-context version: "1.1.0" license: unclear license_treatment: permissive maintenance: abandoned --- # aws-lambda-context — AWS Lambda Context class for type checking and testing License: permissive · Maintenance: abandoned · Downloads: 174.5K/mo ## What it is and what it does aws-lambda-context is a minimal library that exports the AWS Lambda Context class for use in Python Lambda handler functions. It serves two purposes: enabling static type checking of the context parameter in your handler via type hints (so mypy and IDEs can validate your code), and providing mock-friendly versions of the context and related classes for unit testing without invoking actual Lambda. The package contains no runtime dependencies and is a pure Python module. It exports LambdaContext, LambdaCognitoIdentity, LambdaClientContext, and LambdaClientContextMobileClient as dataclass-like objects you can instantiate and configure in tests. The library is abandoned (last release July 2019) but marked stable; it works with Python 3.6 and later. Use it for: - Add type hints to Lambda handler functions so mypy and your IDE can catch context-related type errors before deployment. - Mock the Lambda context object in unit tests without needing to invoke actual Lambda or AWS services. - Build test fixtures that populate all context attributes (function name, request ID, Cognito identity, etc.) for deterministic handler testing. - Enable editor auto-completion for context properties in your handler code. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides the AWS Lambda Context class for type hints and mocking in Lambda handler functions, enabling type checking with mypy and editor auto-completion. Yes, if you are type-checking existing Lambda handlers or writing tests for them and need the context class definition. The package is abandoned and will not receive updates, so it is suitable only for stable, long-lived codebases that do not expect the AWS Lambda context shape to change. If you need current AWS Lambda typing support, verify that the context class matches your runtime version. ## Install pip install aws-lambda-context uv add aws-lambda-context poetry add aws-lambda-context ## Installing aws-lambda-context Before you install: Low install friction with no runtime dependencies. Package is abandoned (last release 2019-07-17, 2585 days ago) but marked Production/Stable; use only if you accept no future maintenance. License in practice: MIT license (permissive); you may use, modify, and distribute freely with attribution. Quickstart: pip install aws-lambda-context from aws_lambda_context import LambdaContext def my_lambda_handler(event: Any, context: LambdaContext) -> None: pass Requires Python 3.6 or later. Verify before relying: - Whether the LambdaContext class definition matches the current AWS Lambda runtime context object shape and all its attributes. - Whether type checking with mypy works correctly with modern mypy versions given the package's age. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 174.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags aws lambda context type hints, lambda handler type checking, mock lambda context testing, aws lambda typing, lambda function type annotations, lambda context mock, python lambda type hints, aws-lambda, type-hints, testing [View on SkillFed](https://skillfed.io/packages/aws-lambda-context) · [View on PyPI](https://pypi.org/project/aws-lambda-context/)