Patent attributes
Systems and methods are described for providing on-demand virtual private environments (VPEs) to serverless code executions. Each VPE can represent a logical isolated network environment. On receiving a request to execute code, an on-demand code execution system can generate a VPE for the code and provision the VPE with network endpoints and gateways that provide access to network services and locations that the code is permitted to access, which services and locations can be identified based on permissions for the code. The on-demand code execution system can then execute the code within an execution environment attached to the VPE, such that network transmissions caused by the code are subject to network-level enforcement of the permissions for the code.