Skip to content

AWS Lambda Runtime Interface Client for Python v4.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 28 Sep 14:41
fa006b6
  • Add pre-fork hooks for multi-concurrent (Lambda Managed Instances) mode. A function can register callables with the @register_pre_fork decorator from awslambdaric.lambda_concurrency_hooks; they run once in the parent process, after the handler is imported and before worker processes are started. Workers re-import the handler in their own process, so hooks are for external side effects (starting a subprocess, warming a local service, writing to /tmp) and share no in-memory state with workers. A hook that raises is reported to the Runtime API as an INIT error with the type Runtime.PreForkError and no worker is started. No impact on the standard on-demand path.