Serverless Security
What is Serverless Security?
Serverless SecurityThe practice of securing event-driven, function-based workloads such as AWS Lambda, Azure Functions, and Google Cloud Functions, where the underlying servers are managed by the provider.
Serverless shifts patching and host security to the provider but introduces new risks: many small functions, ephemeral execution, event-source sprawl (S3, SQS, EventBridge, API Gateway), and tightly bound IAM permissions. Because there is no long-lived host to install an agent on, defenders lose traditional EDR visibility and must rely on platform telemetry, dependency scanning, and tight permissions instead.
The threat is not theoretical. In April 2022 Cado Security documented Denonia, the first publicly known malware built for AWS Lambda — a Go binary bundling a customised XMRig cryptominer that checks for Lambda environment variables before running. AWS stressed that Denonia exploited no weakness in Lambda itself; under the shared-responsibility model it most likely relied on stolen AWS access keys to deploy into the victim's account, underscoring that over-broad credentials are the real serverless attack surface.
Key controls include least-privilege execution roles scoped per function, signed and SBOM-attached deployment packages, dependency scanning (SCA), strict validation of untrusted event payloads to prevent event injection, encrypted environment variables (not plaintext secrets), short timeouts and concurrency limits to blunt "denial-of-wallet" cost abuse, and runtime self-protection or eBPF telemetry. The OWASP Serverless Top 10 and Cloud Security Alliance guidance catalogue the common failures: over-privileged functions, insecure deployment configuration, and injection through untrusted events.
flowchart LR
E[Event source<br/>S3 / API Gateway / SQS] --> F[Function invocation]
F --> R{IAM execution role}
R -->|Least privilege| OK[Scoped action only]
R -->|Over-privileged<br/>e.g. s3:*| ESC[Lateral movement<br/>& data exposure]
F --> D[Dependencies / SCA scan]
D -->|Vulnerable package| INJ[Event injection / RCE]
C[Stolen AWS keys] -.deploy.-> F
F --> M[Platform telemetry<br/>& runtime protection]● Examples
- 01
An AWS Lambda with an IAM role allowing s3:* to all buckets after a small CloudFormation typo.
- 02
Datadog or Snyk scanning Lambda dependencies and flagging vulnerable npm packages.
● Frequently asked questions
What is Serverless Security?
The practice of securing event-driven, function-based workloads such as AWS Lambda, Azure Functions, and Google Cloud Functions, where the underlying servers are managed by the provider. It belongs to the Cloud Security category of cybersecurity.
What does Serverless Security mean?
The practice of securing event-driven, function-based workloads such as AWS Lambda, Azure Functions, and Google Cloud Functions, where the underlying servers are managed by the provider.
How do you defend against Serverless Security?
Defences for Serverless Security typically combine technical controls and operational practices, as detailed in the full definition above.
What are other names for Serverless Security?
Common alternative names include: FaaS security, Lambda security.