Patent attributes
Systems and methods are described for determining a location in an on-demand code execution environment to execute user-specified code. Virtual machines can be utilized to isolate different executions of code from one another. However, virtual machines require additional computing resources to implement, and may slow code executions. This disclosure enables multiple items of code, potentially associated with different users, to be executed on a single virtual machine instance or other device. Specifically, the present disclosure enables the generation of a risk profile for an item of code, which can be used to determine the security or privacy risk that would occur by executing the code on a device. By comparing the risk profiles of a given item of code to other items of code executing on a device, the on-demand code execution environment can selectively group code executions, thus increasing the efficiency of the system while maintaining security and privacy.