Serverless Framework documentation
The Serverless Framework is a command-line tool that deploys applications to AWS from one configuration file, serverless.yml: your AWS Lambda functions' code, the events that trigger them (HTTP requests, queues, schedules and more), and the AWS resources they use. It deploys to AWS only: aws is the one supported provider.name. The optional Serverless Framework Dashboard adds a deployment history, observability, secrets and AWS credential Providers for teams.
A service with one function behind an HTTP endpoint:
# serverless.yml
service: my-service
provider:
name: aws
runtime: nodejs24.x
functions:
hello:
handler: handler.hello
events:
- httpApi:
path: /
method: get
serverless deploy
Functions run on any runtime AWS Lambda offers: the managed Node.js, Python, Java, .NET and Ruby runtimes, or the OS-only provided.al2023 runtime for languages such as Go and Rust (Lambda runtimes).
Philosophy
Build applications that demand attention, not maintenance.
In 2014, AWS introduced AWS Lambda, a more efficient compute service in the cloud. With auto-scaling and no cost when idle, Lambda offers a compute experience that demands so little maintenance it feels "serverless".
Months later, the Serverless Framework was created to streamline deploying all kinds of use cases on AWS Lambda. It introduced the concept of "serverless architectures": a transformative approach to building applications in the cloud that combines AWS Lambda with cloud infrastructure of the same "serverless" qualities, so developers can create entire applications that scale massively with minimal maintenance.
Today, the Serverless Framework continues to be the original, leading and most trusted tool for enterprises and startups building serverless architectures. Renowned Fortune 500 companies such as the New York Times, Nike and EA Games use it, and many startups have reached unicorn valuations and notable exits with it. They achieved this with relatively small engineering teams, by leveraging the power of serverless architectures.
The mission of the Serverless Framework is to empower all developers to build more and manage less.
Highlights
- Empowerment: innovate faster by spending less time on infrastructure management.
- Versatility: tackle diverse serverless use cases, from HTTP APIs and scheduled tasks to WebSockets, queues, data pipelines, web apps, MCP servers and AI agents (AWS Lambda events).
- Infra & Code: streamline development with code and infrastructure deployed together, as one CloudFormation stack (Deploying to AWS).
- Ease of Use: deploy complex applications without deep cloud infrastructure expertise, thanks to approachable YAML configuration, with raw CloudFormation under
resourceswhen you need it (AWS infrastructure resources). - Language Agnostic: develop in your preferred language: Node.js, Python, Java, Kotlin, Scala, C#, F#, Ruby, Go, Rust, PHP, Swift and more. Lambda's managed runtimes run most of them directly, and the OS-only runtime runs the rest.
- Built-in Builds: ship TypeScript without extra plugins: the Framework builds TypeScript handlers with esbuild automatically, and JavaScript handlers when you turn on
build.esbuild(Build configuration). - Full Lifecycle: build, deploy, develop locally against live events with Dev Mode, invoke, monitor with logs and metrics, update and troubleshoot serverless applications from one CLI (CLI reference).
- Scalable Organization: structure large projects and teams with built-in support for stages, per-stage parameters and service composition (Composing services).
- Team Dashboard: add the optional Serverless Framework Dashboard for deployment history, observability, secrets and shared AWS credentials across your team (Dashboard).
- Plugin Ecosystem: extend and modify the Framework's functionality with community plugins or your own (Plugins).
- AI-Ready: the CLI runs without prompts in CI and agent sessions, and Agent Skills and the Serverless MCP Server teach AI agents to use it (Agent Skills).
- Vibrant Community: get support and connect with a passionate community of Serverless developers on the Serverless Framework forum and GitHub.
Get started
- Setting up the Serverless Framework: install the CLI, sign in, set up AWS credentials and deploy a service.
- Tutorial: Build an HTTP API with Lambda and DynamoDB: create, deploy, test and remove a first service, step by step.
- AWS credentials: give the Framework access to your AWS account.
- License keys: use the CLI with an org License Key instead of signing in.
- Upgrading to v4: move a v3 service to v4.
Learn the concepts
- Serverless Framework concepts: services, functions, events and resources, and how they fit together.
- Services: the
serverless.ymlfile and how to organise services. - AWS Lambda functions: configure functions, runtimes, memory, timeouts, environment variables and function URLs.
- AWS Lambda events: how events trigger functions. Each event source has its own page, such as HTTP API, REST API, SQS, S3, Schedule, SNS, EventBridge and Kinesis and DynamoDB streams.
- AWS infrastructure resources: add DynamoDB tables, S3 buckets and other resources with CloudFormation.
Build and deploy
- Deploying to AWS: what
serverless deploydoes, stages and Regions. - Dev Mode: run functions locally against live AWS events.
- Packaging and build configuration: what goes into each deployment package, and bundling with esbuild.
- Variables and parameters: reference environment variables, SSM parameters, stack outputs and per-stage values in
serverless.yml. - IAM permissions for functions: the role your functions run with.
- Custom domains: serve APIs and web apps from your own domain.
- Composing services: deploy several services together and share outputs between them.
- Deploy in your own CI/CD: run the CLI in GitHub Actions, GitLab CI and other pipelines, with keys instead of a browser sign-in. Non-interactive use: CI and AI agents explains how the CLI behaves without a terminal.
- Plugins: extend the Framework with community and custom plugins.
Features
- Web Apps (Lambda Web Functions): deploy web applications and frameworks to Lambda.
- Sandboxes (Lambda MicroVMs): run container workloads in isolated MicroVMs managed by Lambda.
- MCP Servers: deploy Model Context Protocol servers.
- AI Agents: deploy agents on Amazon Bedrock AgentCore.
- AWS Lambda Managed Instances: run functions on AWS-managed EC2 instances.
Reference
- serverless.yml reference: every property, in one annotated file.
- CLI reference: every
serverlesscommand and its options. - Configuration validation: how
serverless.ymlis checked, andconfigValidationMode.
Tools for teams and AI agents
- Serverless Framework Dashboard: deployments, observability, secrets and AWS credential Providers.
- Serverless MCP Server: give AI assistants tools to inspect your services' resources, metrics and logs.
- Agent Skills: teach AI coding agents to work with the Framework.
Examples and help
- Examples and tutorials: templates and example services to start from.
- Serverless Framework forum: ask questions and search earlier answers.
- Serverless Framework issues: report a bug in the Framework.