Securing serverless/function as a service
Although the name implies that there are no servers, the term serverless or function as a service means that you, as a customer of the service, are not in charge of the underlying compute infrastructure (operating system maintenance, scale, runtime management, and so on) – you simply import your code (according to the supported language by each cloud provider), select your preferred runtime, select the amount of required memory per function (which affects the amount of CPU), and set the trigger to invoke the function.
The following diagram presents the architectural differences between VMs, containers, and serverless:
In this section, I will present the most common serverless/function as a service platforms.
Then, we are going to see what the best practices are for securing common serverless services from AWS, Azure, and GCP.