# US 2019/0171470 A1 · Threading as a service

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0171470 A1
- Document ID: US20190171470A1
- Status: Published application
- Kind: A1
- Application number: 16/200,275
- Filed: 2018-11-26
- Published: 2019-06-06
- Earliest claimed: 2014-09-30
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: Timothy Allen Wagner
- Web page: https://patentgrep.com/patent/US20190171470A1

## CPC

- G06F 9/45533: {Hypervisors; Virtual machine monitors}
- G06F 9/445: Program loading or initiating (bootstrapping G06F9/4401; security arrangements for program loading or initiating G06F21/57)
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/50: Allocation of resources, e.g. of the central processing unit [CPU]
- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 2009/45562: {Creating, deleting, cloning virtual machine instances}
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F 2009/45575: {Starting, stopping, suspending or resuming virtual machine instances}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A service manages a plurality of virtual machine instances for low latency execution of user codes. The plurality of virtual machine instances can be configured based on a predetermined set of configurations. One or more containers may be created within the virtual machine instances. In response to a request to execute user code, the service identifies a pre-configured virtual machine instance suitable for executing the user code. The service can allocate the identified virtual machine instance to the user, create a new container within an instance already allocated to the user, or re-use a container already created for execution of the user code. When the user code has not been activated for a time-out period, the service can invalidate allocation of the virtual machine instance destroy the container. The time from receiving the request to beginning code execution is less than a predetermined duration, for example, 100 ms.

## Claims

### Claim 1

(canceled)

### Claim 2

A computer-implemented method to process requests to execute user code on one or more virtual machine instances, the method comprising:
as implemented by one or more computing devices configured with specific executable instructions,
providing a plurality of warmed virtual machine instances, each of the warmed virtual machine instances containing a software component associated with a programming language;
subsequent to providing the plurality of warmed virtual machine instances, processing a request to execute a user code, wherein the request is associated with information usable to execute the user code; and
executing the user code on a virtual machine instance, of the plurality of warmed virtual machine instances, based at least in part on the information associated with the processed request.

### Claim 3 (depends on 2)

The method of claim 2, wherein the information associated with the request comprises a user code identifier, the method further comprising using the user code identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is one that was used to execute the user code prior to the processing of the request.

### Claim 4 (depends on 2)

The method of claim 2, wherein the information associated with the request comprises an operating system identifier, the method further comprising using the operating system identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is running an operating system associated with the operating system identifier.

### Claim 5 (depends on 2)

The method of claim 2, wherein the information associated with the request comprises a language runtime identifier, the method further comprising using the language runtime identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is running a language runtime associated with the language runtime identifier.

### Claim 6 (depends on 2)

The method of claim 2, wherein the information associated with the request comprises a user code identifier, the method further comprising using the user code identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance already has the user code loaded thereon.

### Claim 7 (depends on 2)

The method of claim 2, wherein the information associated with the request comprises a security policy identifier, the method further comprising using the security policy identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is associated with a security policy associated with the security policy identifier.

### Claim 8 (depends on 2)

The method of claim 2, further comprising, based on an occurrence of an event configured to trigger automatic generation of the request to execute the user code, generating the request to execute the user code.

### Claim 9

A system for processing requests to execute user code on one or more virtual machine instances, the system comprising:
one or more processors;
one or more memories having stored thereon instructions, which, when executed by the one or more processors, cause the one or more processors to:
cause a plurality of warmed virtual machine instances to be provided, each of the warmed virtual machine instances containing a software component associated with a programming language;
subsequent to causing the plurality of warmed virtual machine instances to be provided, process a request to execute a user code,
wherein the request is associated with information usable to execute the user code; and
cause the user code to be executed on a virtual machine instance, of the plurality of warmed virtual machine instances, based at least in part on the information associated with the processed request.

### Claim 10 (depends on 9)

The system of claim 9, wherein the information associated with the request comprises a user code identifier, the instructions, when executed, further causing the one or more processors to use the user code identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is one that was used to execute the user code prior to the processing of the request.

### Claim 11 (depends on 9)

The system of claim 9, wherein the information associated with the request comprises an operating system identifier, the instructions, when executed, further causing the one or more processors to use the operating system identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is running an operating system associated with the operating system identifier.

### Claim 12 (depends on 9)

The system of claim 9, wherein the information associated with the request comprises a language runtime identifier, the instructions, when executed, further causing the one or more processors to use the language runtime identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is running a language runtime associated with the language runtime identifier.

### Claim 13 (depends on 9)

The system of claim 9, wherein the information associated with the request comprises a user code identifier, the instructions, when executed, further causing the one or more processors to use the user code identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance already has the user code loaded thereon.

### Claim 14 (depends on 9)

The system of claim 9, wherein the information associated with the request comprises a security policy identifier, the instructions, when executed, further causing the one or more processors to use the security policy identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is associated with a security policy associated with the security policy identifier.

### Claim 15 (depends on 9)

The system of claim 9, wherein the instructions, when executed, further cause the one or more processors to, based on an occurrence of an event configured to trigger automatic generation of the request to execute the user code, generate the request to execute the user code.

### Claim 16

Non-transitory physical computer storage storing specific executable instructions, which, when executed by a computer system, cause the computer system to:
cause a plurality of warmed virtual machine instances to be provided, each of the warmed virtual machine instances containing a software component associated with a programming language;
subsequent to causing the plurality of warmed virtual machine instances to be provided, process a request to execute a user code, wherein the request is associated with information usable to execute the user code; and
cause the user code to be executed in the identified virtual machine instance, of the plurality of warmed virtual machine instances, based at least in part on the information associated with the processed request.

### Claim 17 (depends on 16)

The non-transitory physical computer storage of claim 16, wherein the information associated with the request comprises a user code identifier, the instructions, when executed, further causing the one or more processors to use the user code identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is one that was used to execute the user code prior to the processing of the request.

### Claim 18 (depends on 16)

The non-transitory physical computer storage of claim 16, wherein the information associated with the request comprises an identifier, the instructions, when executed, further causing the computer system to use the identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance has (i) an operating system associated with the identifier, (ii) a language runtime associated with the identifier, or (iii) a library associated with the identifier.

### Claim 19 (depends on 16)

The non-transitory physical computer storage of claim 16, wherein the instructions, when executed, further cause the one or more processors to, based on an occurrence of an event configured to trigger automatic generation of the request to execute the user code, generate the request to execute the user code.

### Claim 20 (depends on 16)

The non-transitory physical computer storage of claim 16, wherein the information associated with the request comprises a user code identifier, the instructions, when executed, further causing the computer system to use the user code identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance already has the user code loaded thereon.

### Claim 21 (depends on 16)

The non-transitory physical computer storage of claim 16, wherein the information associated with the request comprises a security policy identifier, the instructions, when executed, further causing the computer system to use the security policy identifier to identify the virtual machine instance from the plurality of warmed virtual machine instances, prior to executing the user code on the identified virtual machine instance, such that the identified virtual machine instance is associated with a security policy associated with the security policy identifier.
