AWS. Lambda. Runtime
(AWS Lambda Runtime v0.1.1)
View Source
The custom runtime loop.
Started as a permanent Task by the application supervisor. The lifecycle is:
- start the
:httpcprofile and resolve the handler (initialisation — any failure here is reported to/runtime/init/errorand halts the VM); - long-poll
GET /runtime/invocation/next, which is where the sandbox is frozen between invocations; - run the handler in a supervised task bounded by the invocation deadline;
- post the result to
/responseor the failure to/error; - go back to step 2 with the VM still warm.
Handler failures never crash this process, so a warm sandbox survives a bad invocation and the next one avoids a cold start.
Summary
Functions
Returns a specification to start this module under a supervisor.
Entry point invoked by start_link/1 through Task.start_link/3.
Starts the runtime loop as a supervised, permanently-restarted Task.
Functions
Returns a specification to start this module under a supervisor.
arg is passed as the argument to Task.start_link/1 in the :start field
of the spec.
For more information, see the Supervisor module,
the Supervisor.child_spec/2 function and the Supervisor.child_spec/0 type.
Entry point invoked by start_link/1 through Task.start_link/3.
Not meant to be called directly — resolves the handler, then loops forever.
Starts the runtime loop as a supervised, permanently-restarted Task.