I understand that when a Lambda times-out, it returns an error.
Once the Lambda times-out, though, I'd like to know if it's immediately killed by AWS, or if it can potentially continue running for an arbitrary amount of time in the background (detached from the original request, so to speak).
I ask because it's important in my situation that when a Lambda times out, all processing inside that Lambda also stops immediately. If AWS does not guarantee this, then I will need to implement my own measures to ensure this for myself, i.e. by periodically checking against the clock and manually halting execution beyond the timeout.
(p.s. if Lambdas are killed immediately on timeout, I'd like to know how AWS achieves keeping the Lambda in a warm, initialised state for subsequent invocations. I.e. it cannot simply be that it kills the process on timeout, otherwise the Lambda would be cold for next time...)