• 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 KeysVerifying Downloads
DeployingPackagingBuildingTestingDev ModeServicesFunctions
OverviewHTTP (API Gateway v2)REST (API Gateway v1)ActiveMQApplication Load BalancerAlexa SkillAlexa Smart HomeCloudWatch EventCloudWatch LogCloudFrontCognito User PoolEventBridge EventIoTIoT Fleet ProvisioningKafkaKinesis & DynamoDBMSKRabbitMQS3ScheduleSNSSQSWebsocket
Layers
OverviewTroubleshooting
Managed 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

AWS Lambda Event Sources

An event source is the AWS service or resource that invokes a Lambda function, such as an HTTP request, a queue message or a schedule. In serverless.yml, each function lists its event sources under events, one list item per trigger, keyed by the event name:

functions:
  processOrder:
    handler: handler.handler
    events:
      - httpApi: 'POST /orders'
      - sqs: arn:aws:sqs:us-east-1:123456789012:orders

The pages in this section document each event key. For how events work across all sources, see AWS Lambda events.

HTTP event sources

  • HTTP API (API Gateway v2): httpApi routes HTTP requests from an Amazon API Gateway HTTP API to a function.
  • REST API (API Gateway v1): http routes HTTP requests from an Amazon API Gateway REST API, for features only REST APIs have.
  • WebSocket API: websocket handles connect, disconnect and message routes of an API Gateway WebSocket API.
  • Application Load Balancer: alb registers a function as the target of a listener rule on an existing Application Load Balancer.
  • CloudFront (Lambda@Edge): cloudFront runs a function at CloudFront edge locations on viewer and origin requests and responses.

Messaging and stream event sources

  • SQS: sqs processes messages from an Amazon SQS queue in batches.
  • SNS: sns invokes a function for each message published to an Amazon SNS topic.
  • Kinesis and DynamoDB Streams: stream processes records from a Kinesis data stream or a DynamoDB table stream.
  • MSK: msk consumes a topic of an Amazon MSK (Managed Streaming for Apache Kafka) cluster.
  • Kafka: kafka consumes a topic of a self-managed Apache Kafka cluster.
  • ActiveMQ: activemq consumes a queue of an Amazon MQ for ActiveMQ broker.
  • RabbitMQ: rabbitmq consumes a queue of an Amazon MQ for RabbitMQ broker.

Storage and data event sources

  • S3: s3 invokes a function for Amazon S3 event notifications, such as an object created or removed, on a new or existing bucket.
  • CloudWatch Logs: cloudwatchLog streams log events from a CloudWatch Logs log group through a subscription filter.

Scheduling and EventBridge event sources

  • Schedule: schedule runs a function on a rate() or cron() schedule.
  • EventBridge: eventBridge invokes a function for events on the default or a custom Amazon EventBridge event bus that match a pattern.
  • CloudWatch Events: cloudwatchEvent invokes a function for AWS service events on the default event bus that match a pattern.

Other AWS service event sources

  • Cognito User Pool: cognitoUserPool attaches a function to an Amazon Cognito user pool trigger, such as pre sign-up or post confirmation.
  • AWS IoT rule: iot invokes a function for MQTT messages that match an AWS IoT rule's SQL statement.
  • IoT fleet provisioning: iotFleetProvisioning makes a function the pre-provisioning hook of an AWS IoT fleet provisioning template.
  • Alexa Skill: alexaSkill lets an Alexa custom skill invoke a function.
  • Alexa Smart Home: alexaSmartHome lets an Alexa smart home skill invoke a function.
Edit this page
NextIntro

Contents

  • AWS Lambda Event Sources
  • HTTP event sources
  • Messaging and stream event sources
  • Storage and data event sources
  • Scheduling and EventBridge event sources
  • Other AWS service event sources

Related

GuidesPluginsExamplesSlack CommunitySupport