AWS Lambda · AsyncAPI Specification
AWS Lambda Event Triggers
Version 2015-03-31
AWS Lambda integrates with other AWS services to invoke functions in response to events. Lambda functions can be triggered by event sources including Amazon S3, Amazon DynamoDB Streams, Amazon Kinesis Data Streams, Amazon SQS, Amazon SNS, Amazon API Gateway, Amazon EventBridge, Amazon CloudWatch Events, Amazon Cognito, and many more. Event sources send event data as JSON payloads that Lambda passes to the function handler. Events are processed synchronously (push model), asynchronously (event model), or by Lambda polling a stream or queue (poll model).
Channels
s3/event
Receive S3 object event notifications
Amazon S3 sends event notifications to Lambda when objects are created, modified, or deleted in a bucket. S3 invokes your function asynchronously with an event that contains details about the object. You configure notifications on the S3 bucket to specify which events trigger the function.
dynamodb/stream
Receive DynamoDB Streams records
Amazon DynamoDB Streams captures a time-ordered sequence of item-level modifications in a DynamoDB table. Lambda polls the stream and invokes your function synchronously with a batch of stream records. You create an event source mapping to connect the stream to your function.
kinesis/stream
Receive Kinesis Data Streams records
Amazon Kinesis Data Streams captures real-time data at scale. Lambda polls the Kinesis stream and invokes your function with a batch of records from one or more shards. You create an event source mapping to connect the stream to your function.
sqs/message
Receive SQS queue messages
Amazon SQS queues messages for asynchronous processing. Lambda polls the queue and invokes your function with a batch of messages. When the function successfully processes a batch, Lambda deletes the messages from the queue. Supports both standard and FIFO queues.
sns/notification
Receive SNS topic notifications
Amazon SNS delivers notifications to Lambda functions subscribed to an SNS topic. When a message is published to the topic, SNS invokes your function asynchronously with the message payload. Supports standard topics for fanout to multiple subscribers.
apigateway/request
Receive API Gateway HTTP requests
Amazon API Gateway invokes Lambda functions in response to HTTP API requests. API Gateway passes the request details as an event to the function and returns the function response to the caller. Supports REST APIs (v1 payload format) and HTTP APIs (v2 payload format).
eventbridge/event
Receive EventBridge events
Amazon EventBridge delivers events from AWS services, custom applications, and SaaS partners to Lambda functions. EventBridge rules match incoming events and route them to target functions. You create rules that match event patterns and specify the Lambda function as a target.
cloudwatch/scheduledevent
Receive scheduled invocations
Amazon EventBridge Scheduler (formerly CloudWatch Events scheduled rules) invokes Lambda functions on a schedule. You define a schedule expression using a rate or cron expression, and EventBridge invokes the function at the specified intervals.
cognito/trigger
Receive Cognito user pool trigger events
Amazon Cognito invokes Lambda functions as triggers during user pool operations such as sign-up, authentication, and token generation. The function can modify the authentication flow, validate data, or add custom claims.
cloudwatch/alarm
Receive CloudWatch alarm state changes
Amazon CloudWatch can invoke Lambda functions as alarm actions when a metric alarm changes state. The function receives details about the alarm state change.
cloudwatch/logs
Receive CloudWatch Logs subscription filter events
Amazon CloudWatch Logs can invoke a Lambda function when a subscription filter matches log events. The log data is delivered as a batch of log events compressed with gzip and base64-encoded.
Messages
S3Event
Amazon S3 Event
S3 object event notification delivered to Lambda
DynamoDBStreamEvent
Amazon DynamoDB Stream Event
Batch of DynamoDB Streams records delivered to Lambda
KinesisEvent
Amazon Kinesis Event
Batch of Kinesis Data Streams records delivered to Lambda
SQSEvent
Amazon SQS Event
Batch of SQS messages delivered to Lambda
SNSEvent
Amazon SNS Event
SNS notification delivered to Lambda
APIGatewayProxyEvent
API Gateway REST API Proxy Event (v1)
HTTP request from API Gateway REST API
APIGatewayV2ProxyEvent
API Gateway HTTP API Proxy Event (v2)
HTTP request from API Gateway HTTP API
EventBridgeEvent
Amazon EventBridge Event
Event from EventBridge event bus
ScheduledEvent
Scheduled Event
Scheduled invocation from EventBridge Scheduler
CognitoEvent
Amazon Cognito User Pool Trigger Event
Cognito user pool trigger event
CloudWatchAlarmEvent
Amazon CloudWatch Alarm Event
CloudWatch alarm state change event
CloudWatchLogsEvent
Amazon CloudWatch Logs Event
CloudWatch Logs subscription filter event
Servers
https
lambdaRuntime
https://lambda.{region}.amazonaws.com
AWS Lambda service endpoint. Event sources deliver events to Lambda which invokes the configured function. The function receives the event payload as the first argument to the handler.