Address-driven services for on-demand code execution
Systems and methods are provided for allowing service providers to take actions based on identifying a function invoker executing a function via an on-demand code execution service. The service provider may receive an IP address or header information from the on-demand code execution service along with information regarding a function invoked by a function invoker. The service provider may determine the function invoker based on reviewing the IP address or header information. Once identifying the function invoker, the service provider may take actions based at least on information regarding the function invoked and the function invoker.
1 . A network computing provider system comprising:
an on-demand code execution service comprising a first set of one or more computing devices configured to provide on-demand execution of function code;
a plurality of function invokers configured to invoke functions on the on-demand code execution service, wherein a first function invoker of the plurality of function invokers comprises a second set of one or more computing devices; and
a plurality of service providers configured to provide computing services via the on-demand code execution service, wherein a first service provider of the plurality of service providers comprises a third set of one or more computing devices, and wherein the first service provider is configured to:
obtain a range of internet protocol (IP) addresses within the network computing provider system, wherein the range of IP addresses is obtained by only the first service provider;
determine an IP address of the range of IP addresses to be assigned to the first function invoker;
send IP address data to the first function invoker, wherein the IP address data represents the IP address assigned to the first function invoker;
store mapping data representing assignment of the IP address to the first function invoker;
receive, from the on-demand code execution service, a communication associated with a function invoked on the on-demand code execution service, wherein the communication comprises a source IP address associated with a virtual environment executing the function on a computing device of the first set of one or more computing devices;
determine, using the mapping data, that the source IP address is the IP address assigned to the first function invoker; and
take one or more actions in response to the communication based at least in part on the IP address being assigned to the first function invoker.
2 . The network computing provider system of claim 1 , wherein the first function invoker is configured to send a function invocation request to the on-demand code execution service, wherein the function invocation request comprises the IP address and a request to execute the function, and wherein the IP address is different than a second source IP address of the first function invoker.
3 . The network computing provider system of claim 2 , wherein the on-demand code execution service is configured to:
provision a virtual environment with the IP address in response to the function invocation request; and
cause the virtual environment to execute the function, wherein the virtual environment sends the communication during execution of the function.
4 . The network computing provider system of claim 2 , wherein the on-demand code execution service is configured to:
in response to the function invocation request, identify a virtual environment provisioned with the IP address; and
cause the virtual environment to execute the function, wherein the virtual environment sends the communication during execution of the function.
5 . A computer-implemented method comprising:
as implemented by a computing system comprising one or more computer processors configured to execute specific instructions:
receiving, by a service provider, internet protocol (IP) address data representing a range of IP addresses available to be assigned to function invokers;
assigning, by the service provider, an IP address of the range of IP addresses to a function invoker, wherein the function invoker is to provide the IP address to an on-demand code execution service in function invocation requests made by the function invoker to the on-demand code execution service;
storing, by the service provider, mapping data representing assignment of the IP address to the function invoker;
receiving, from the on-demand code execution service, a communication associated with a function invoked on the on-demand code execution service, wherein the communication is associated with a source IP address; and
executing, by the service provider, one or more actions based at least in part on identifying, using the stored mapping data, that the source IP address corresponds to the IP address assigned to the function invoker.
6 . The computer-implemented method of claim 5 , further comprising sending, by the function invoker, a function invocation request to the on-demand code execution service, wherein the function invocation request comprises the IP address and a request to execute the function, and wherein the IP address is different than a second source IP address of the function invoker.
7 . The computer-implemented method of claim 6 , further comprising:
provisioning, by the on-demand code execution service, a virtual environment with the IP address in response to the function invocation request; and
causing the virtual environment to execute the function, wherein the virtual environment sends the communication during execution of the function.
8 . The computer-implemented method of claim 6 , further comprising:
identifying, by the on-demand code execution service in response to the function invocation request, a virtual environment provisioned with the IP address; and
causing the virtual environment to execute the function, wherein the virtual environment sends the communication during execution of the function.
9 . The computer-implemented method of claim 5 , wherein executing the one or more actions comprise application of a firewall rule to the communication from the on-demand code execution service based on the source IP address of the communication being the IP address assigned to the function invoker.
10 . The computer-implemented method of claim 5 , further comprising determining that the function invoker has used a threshold amount of network bandwidth, wherein executing the one or more actions comprises applying bandwidth throttling to functions invoked by the function invoker on the on-demand code execution service.
11 . The computer-implemented method of claim 5 , wherein executing the one or more actions comprises:
applying a security rule to the communication from the on-demand code execution service based on the source IP address of the communication being the IP address assigned to the function invoker; and
preventing access to a computing resource based on applying the security rule to the communication.
12 . The computer-implemented method of claim 5 , wherein executing the one or more actions comprises:
applying a security rule to the communication from the on-demand code execution service based on the source IP address of the communication being the IP address assigned to the function invoker; and
permitting access to a computing resource based on applying the security rule to the communication.
13 . The computer-implemented method of claim 5 , wherein executing the one or more actions comprises auditing network activity of the function invoker based on the source IP address of the communication being the IP address assigned to the function invoker.
14 . The computer-implemented method of claim 5 , wherein executing the one or more actions comprises logging activity associated with execution of the function based on the source IP address of the communication being the IP address assigned to the function invoker.
15 . The computer-implemented method of claim 5 , wherein executing the one or more actions comprises routing the communication to a destination based on the source IP address of the communication being the IP address assigned to the function invoker.
16 . A system comprising computer readable memory and one or more processors, wherein the system is configured to:
receive internet protocol (IP) address data representing a range of IP addresses available to be assigned to function invokers;
assign an IP address of the range of IP addresses to a function invoker, wherein the function invoker is to provide the IP address to an on-demand code execution service in function invocation requests made by the function invoker to the on-demand code execution service;
store mapping data representing assignment of the IP address to the function invoker;
receive, from the on-demand code execution service, a communication associated with a function invoked on the on-demand code execution service, wherein the communication is associated with a source IP address; and
execute an action based at least in part on identifying, using the stored mapping data, that the source IP address corresponds to the IP address assigned to the function invoker.
17 . The system of claim 16 , further comprising the function invoker, wherein the function invoker is configured to send a function invocation request to the on-demand code execution service, wherein the function invocation request comprises the IP address and a request to execute the function, and wherein the IP address is different than a second source IP address of the function invoker.
18 . The system of claim 17 , further comprising the on-demand code execution service, wherein the on-demand code execution service is configured to:
determine whether a virtual environment has been provisioned with the IP address; and
cause the virtual environment to execute the function, wherein the virtual environment sends the communication during execution of the function.
19 . The system of claim 16 , wherein to execute the action, the system is configured to:
determine that the function invoker has used a threshold amount of network bandwidth; and
apply bandwidth throttling to functions invoked by the function invoker on the on-demand code execution service.
20 . The system of claim 16 , wherein to execute the action, the system is configured to apply one of a security rule, firewall rule, or routing rule to the communication from the on-demand code execution service based on the source IP address of the communication being the IP address assigned to the function invoker.