Advisor
Wiki Infrastructure, Protocols & Environments Cloud Platforms Serverless Computing Architecture

Serverless Computing Architecture

3 min read
Jump to:

Overview

Serverless computing architecture is a cloud-native execution model where the cloud provider dynamically manages the allocation and provisioning of servers. It enables developers to deploy and run code without managing underlying infrastructure, promoting scalability and operational efficiency. This architecture is foundational for modern digital systems due to its abstraction of infrastructure, rapid deployment capabilities, and cost-effective resource utilization.

Core Components

  • Function-as-a-Service (FaaS) platforms that execute discrete units of code in response to events
  • Event sources and triggers such as HTTP requests, messaging queues, or scheduled timers
  • Backend services including databases, storage, and identity management integrated with serverless functions
  • API gateways that route external requests to serverless functions
  • Management and orchestration layers that handle scaling, deployment, and lifecycle of functions

How It Works

Serverless computing operates by invoking small, stateless functions in response to events or API calls. The cloud provider abstracts the infrastructure, automatically scaling resources based on demand. Data flows from event sources through API gateways or messaging systems to the serverless functions, which execute business logic and interact with backend services. Trust relationships are established between the function runtime environment, identity providers, and backend resources, with control boundaries defined by permissions and execution contexts managed by the cloud platform.

Trust & Security Model

  • Authentication and authorization are typically enforced via identity and access management (IAM) policies governing function invocation and resource access
  • Trust boundaries exist between the cloud provider’s managed runtime, customer code, and integrated services, relying on isolation mechanisms such as containerization or microVMs
  • Credentials and secrets are managed through secure vaults or environment variables with restricted access, minimizing exposure within function code

Common Misconfigurations & Weaknesses

  • Overly permissive IAM roles granting excessive access to functions
  • Insufficient input validation leading to injection or data manipulation vulnerabilities
  • Exposure of sensitive information through logs or environment variables
  • Neglecting to configure proper network segmentation and egress controls
  • Lack of function timeout settings causing resource exhaustion

Attack Surface & Abuse Scenarios

  • Exploitation of vulnerable functions via crafted inputs or event triggers
  • Privilege escalation through misconfigured permissions allowing lateral movement
  • Denial-of-service attacks targeting function invocation limits or resource quotas
  • Abuse of event sources to trigger excessive function executions and incur costs
  • Dependency risks from third-party libraries or backend services integrated with functions

Visibility & Monitoring

  • Execution logs, invocation metrics, and error reports provided by the cloud platform
  • Tracing and telemetry data enabling correlation of events across distributed functions
  • Challenges include limited visibility into underlying infrastructure and ephemeral execution contexts
  • Potential gaps in detecting anomalous behavior due to rapid scaling and short-lived function instances

Hardening & Security Controls

  • Implement least privilege principles in IAM policies for function permissions
  • Use secure secret management solutions rather than hardcoding credentials
  • Enforce input validation and output encoding within functions
  • Configure network controls such as private endpoints and egress filtering
  • Apply function timeout and concurrency limits to mitigate resource abuse
  • Enable comprehensive logging and integrate with centralized monitoring and alerting systems

Operational Considerations

  • Manage function lifecycle including versioning, deployment, and decommissioning with change control processes
  • Design for high availability and resilience by distributing functions across regions or availability zones
  • Plan for scaling behavior and dependency management to avoid cascading failures
  • Ensure backup and recovery strategies for stateful backend services integrated with serverless functions

Related Domains & Dependencies

  • Cloud platforms providing the serverless runtime and infrastructure
  • Identity and access management systems controlling function permissions
  • API gateways and messaging protocols facilitating event-driven invocation
  • Backend data stores and storage services accessed by serverless functions
  • Monitoring and security information and event management (SIEM) systems for observability

Standards & References

  • Cloud Security Alliance (CSA) Serverless Working Group guidance
  • National Institute of Standards and Technology (NIST) Special Publication 800-190 on Application Container Security
  • Relevant sections of the OAuth 2.0 and OpenID Connect protocols for authentication in serverless environments
  • Industry best practices for identity and access management in cloud-native architectures
Tags: architecture cloud identity infrastructure ot protocol saas security trust