You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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.