• Documentation
  • Pricing
© 2026 Serverless, Inc. All rights reserved.

Framework

  • Overview
  • Documentation
  • Plugins360
  • Pricing

Learn

  • Blog
  • GuidesUpdated
  • Examples240
  • Courses

Resources

  • Support
  • Security
  • Trust Center
  • Status

Community

  • Slack
  • GitHub47k
  • Forum
  • Meetups

Company

  • About
  • Careers
  • Contact
  • Partners

Legal

  • Terms of Service
  • Privacy Policy
  • Trademark
  • DMCA
Serverless Framework Logo

Serverless Framework

Intro
SetupUpgrading To V4ConceptsTutorialAWS CredentialsLicense Keys
DeployingPackagingBuildingTestingDev ModeServicesFunctions
OverviewHTTP (API Gateway v2)REST (API Gateway v1)ActiveMQApplication Load BalancerAlexa SkillAlexa Smart HomeCloudWatch EventCloudWatch LogCloudFrontCognito User PoolEventBridge EventIoTIoT Fleet ProvisioningKafkaKinesis & DynamoDBMSKRabbitMQS3ScheduleSNSSQSWebsocket
LayersManaged InstancesWeb Apps (Lambda Web Functions)Sandboxes (Lambda MicroVMs)MCP ServersAlertsVersion PruningDomainsIAM Function PermissionsParameters
OverviewSelf-reference serverless.ymlServerless CoreEnvironment VariablesCLI OptionsExternal YAML/JSON FilesJavascript propertiesGitDoppler
OverviewS3 ObjectsSSM Parameter Store & Secrets ManagerCloudFormation Stack Outputs
OverviewVaultTerraform State Output
ResourcesComposing ServicesDeployment BucketStateAgent SkillsPython support
OverviewRuntimeGatewayMemoryBrowserCode InterpreterDev Mode
API Gateway Proxy
OverviewGeneral ConfigurationAuthenticationAPI KeysData SourcesResolversPipeline FunctionsSubstitutionsCachingDelta SyncCustom DomainWAFCLI Commands
Deploying SAM/CFN TemplatesWorkflow Tips
OverviewCreating PluginsCLI OutputCustom CommandsCustom VariablesExtending the Configuration schemaExtending and overriding configuration
OverviewDashboardAxiom
Overviewagent docsagent inspectagent setupagent skills installagent skills list / readdeploydeploy functiondeploy listdevdiffinfoinvokeinvoke localloginlogin awslogin aws ssologsmetricspackageplugin installplugin uninstallprintprunereconcileremoverollbackrollback functionusage
OverviewConcepts
OverviewMetricsTracesTroubleshoot
OverviewNode.jsPython
OutputsProviders
OverviewBranch DeploymentsPreview DeploymentsCustom ScriptsTestingPrivate PackagesNotificationsMono ReposDeploy in your own CI/CDBest PracticesTroubleshootingFAQ
OverviewSetupToolsAWS Integration
Serverless.yml Reference
Examples and TutorialsConfiguration Validation
  1. Get Started
  2. Concepts

Serverless Framework Concepts

The Serverless Framework is a command-line tool that deploys AWS Lambda functions together with the events that trigger them and the AWS resources they use, from one configuration file per service. This page defines the concepts the rest of the docs use (service, function, event, resource, stage and plugin) and links to the page that covers each.

Here is a service that uses all of them:

# serverless.yml
service: users # the service

provider:
  name: aws
  runtime: nodejs24.x
  stage: dev # the default stage

plugins: # plugins that extend the Framework
  - serverless-offline

functions: # the functions
  createUser:
    handler: handler.createUser
    events: # the events that trigger createUser
      - httpApi: 'POST /users'

resources: # other AWS resources, in CloudFormation syntax
  Resources:
    UsersTable:
      Type: AWS::DynamoDB::Table
      Properties:
        AttributeDefinitions:
          - AttributeName: email
            AttributeType: S
        KeySchema:
          - AttributeName: email
            KeyType: HASH
        BillingMode: PAY_PER_REQUEST

serverless deploy deploys everything in the file at once.

Services

A service is one serverless.yml and everything it deploys: functions, their events and other resources. It is the Framework's unit of deployment; an application is often several services, deployed together with Serverless Compose. See Services.

Besides serverless.yml, the configuration file can be serverless.yaml, serverless.json, serverless.toml, serverless.js, serverless.mjs, serverless.cjs or serverless.ts. A JavaScript or TypeScript file exports the configuration object, and the Framework loads serverless.ts without a separate TypeScript loader:

// serverless.mjs
export default {
  service: 'users',
  provider: { name: 'aws', runtime: 'nodejs24.x' },
  functions: {
    createUser: {
      handler: 'handler.createUser',
      events: [{ httpApi: 'POST /users' }],
    },
  },
}

Functions

A function is your code deployed as an AWS Lambda function, with its handler, runtime, memory, timeout, environment variables and permissions. Each function usually does one job, such as saving a user or resizing an image. See Functions.

Events

An event is what triggers a function: an HTTP request, a message on an SQS queue, a file uploaded to S3, a schedule. For each event in a function's events list, the Framework creates the event source or connects an existing one, and grants it permission to invoke the function. See AWS Lambda events for every event type.

Resources

Resources are the other AWS infrastructure your functions use, such as DynamoDB tables, S3 buckets or SNS topics. You declare them under resources in AWS CloudFormation syntax, and the Framework deploys them with the functions. See AWS infrastructure resources.

Stages

A stage is one deployed copy of a service, such as dev, staging or prod. Each stage is a separate AWS CloudFormation stack named <service>-<stage>, so each stage has its own functions and resources. Select the stage with --stage on the command line or provider.stage in serverless.yml; without either, the stage is dev. The region works the same way with --region and provider.region, and defaults to us-east-1. Use parameters for values that differ per stage, and see deploying for how a stage is deployed.

Plugins

A plugin adds commands or deployment behavior to the Framework, for example serverless-offline for running an HTTP API locally. List plugins under plugins in serverless.yml and install them with serverless plugin install. Python requirements, alerts and version pruning are built in and need no plugin. See Plugins.

Edit this page
Prev Upgrading To V4NextTutorial

Contents

  • Serverless Framework Concepts
  • Services
  • Functions
  • Events
  • Resources
  • Stages
  • Plugins

Related

GuidesPluginsExamplesSlack CommunitySupport