How aws/aws-lambda-python-runtime-interface-client works
The repository is the AWS Lambda Python Runtime Interface Client: it starts a user handler, obtains invocation events from the Lambda Runtime API, constructs invocation context, runs the handler, and reports its result or error. The graph includes standard and multi-concurrent execution, serialization, initialization hooks, logging, and the documented local-emulator use. Source excerpts establish the main calls; unsampled subsystem links are omitted where the README does not document them.
Main entry points: bootstrap.py Runtime bootstrap · __main__.py CLI launcher · lambda_runtime_client.py Runtime API client · lambda_multi_concurrent_utils.py Worker orchestration
Components 17
Runtime entry
- CLI launcher
awslambdaric/__main__.py - Runtime configuration
awslambdaric/lambda_config.py - Runtime bootstrap
awslambdaric/bootstrap.py
Invocation processing
- Invocation context
awslambdaric/lambda_context.py - Runtime API client
awslambdaric/lambda_runtime_client.py - Native transport
awslambdaric/runtime_client.cpp - JSON marshalling
awslambdaric/lambda_runtime_marshaller.py
Runtime support
- Runtime faults
awslambdaric/lambda_runtime_exception.py - Runtime logging
awslambdaric/lambda_runtime_log_utils.py - Runtime warnings
awslambdaric/lambda_literals.py - Snapshot hooks
awslambdaric/lambda_runtime_hooks_runner.py
Concurrent execution
- Worker orchestration
awslambdaric/lambda_multi_concurrent_utils.py - Pre-fork hooks
awslambdaric/lambda_concurrency_hooks.py - Concurrent API client
awslambdaric/lambda_runtime_client.py
Other components
- User handler
- Lambda Runtime API
- Runtime Interface Emulator
Connections 21
- CLI launcher → Runtime configuration: loads settings
awslambdaric/__main__.py - CLI launcher → Runtime bootstrap: starts runtime
awslambdaric/__main__.py - CLI launcher → Worker orchestration: dispatches mode
awslambdaric/__main__.py - Runtime configuration → CLI launcher: provides options
awslambdaric/__main__.py - Runtime bootstrap → Runtime API client: polls and reports
awslambdaric/bootstrap.py - Runtime bootstrap → Invocation context: constructs context
awslambdaric/bootstrap.py - Runtime bootstrap → User handler: invokes handler
awslambdaric/bootstrap.py - Runtime bootstrap → JSON marshalling: marshals payloads
awslambdaric/bootstrap.py - Runtime bootstrap → Runtime faults: formats failures
awslambdaric/bootstrap.py - Runtime bootstrap → Runtime logging: configures logging
awslambdaric/bootstrap.py - Runtime bootstrap → Runtime warnings: loads warnings
awslambdaric/bootstrap.py - Runtime bootstrap → Snapshot hooks: runs lifecycle hooks
awslambdaric/bootstrap.py - Runtime API client → Native transport: polls and posts
awslambdaric/lambda_runtime_client.py - Runtime API client → JSON marshalling: encodes payloads
awslambdaric/lambda_runtime_client.py - Runtime API client → Runtime faults: raises runtime faults
awslambdaric/lambda_runtime_client.py - Native transport → Lambda Runtime API: exchanges invocations
- Worker orchestration → Runtime bootstrap: runs workers
awslambdaric/lambda_multi_concurrent_utils.py - Worker orchestration → Concurrent API client: creates client
awslambdaric/lambda_multi_concurrent_utils.py - Worker orchestration → Pre-fork hooks: runs registered hooks
awslambdaric/lambda_multi_concurrent_utils.py - Concurrent API client → Native transport: polls and posts
awslambdaric/lambda_runtime_client.py - Runtime Interface Emulator → CLI launcher: starts local runtime
README.md