AWS Lambda invocation lifecycle
AWS Lambda invocation is driven by a simple pull-based loop between the runtime and the Lambda Service. The runtime continuously requests work using the Runtime API, executes the user function for each event, and reports the result back to the service. This model simplifies scaling, avoids concurrency inside the runtime, and explains why cold and warm invocations behave differently.