Context can be used to determine whether a virtual resource instance can be reused for a received event or request, which requires executing customer code using the instance. One or more rules can apply, which can be based upon aspects of the events, information associated with the events, or threat intelligence associated with the events. Once the context is determined, it can be determine whether any instances are available to process events for that context. The instances can include warmed instances, ready to execute the code for the event, or can be frozen instances which have state information available for loading without having to go through an initialization procedure. If no instances are available, a new instance can be initialized and used to execute the code. The number of instances available and flexibility with respect to context can vary over time and under load, among other such factors.
展开▼