AWS Lambda is a serverless compute service that runs your code in response to events and scales automatically, with no servers to manage. You package code as a .zip archive or a container image, give it an execution role, and Lambda handles provisioning, scaling, and logging.
With the Lambda integration, you can:
Invoke Function: Run a function synchronously and read back its parsed response payload, queue it asynchronously, or dry-run it to verify permissions — with the decoded execution log tail when something fails
Manage functions: Create, read, update, and delete functions, including runtime, handler, memory, timeout, ephemeral storage, environment variables, VPC attachment, layers, X-Ray tracing, SnapStart, and CloudWatch log settings
Version and alias: Publish immutable versions, then point aliases such as prod at them — including weighted routing to shift a percentage of traffic to a new version for canary releases
Wire up event sources: Create and tune event source mappings for SQS, Kinesis, DynamoDB Streams, Amazon MQ, DocumentDB, Amazon MSK, and self-managed Kafka — with batch size, batching window, filter patterns, retry limits, success/failure destinations, broker authentication, and consumer group IDs
Control concurrency: Reserve a share of account concurrency for a function, allocate provisioned concurrency to a version or alias to eliminate cold starts, and read account-level limits and usage
Expose function URLs: Create dedicated HTTPS endpoints with AWS_IAM or public auth, buffered or streamed responses, and full CORS configuration
Configure async behavior: Set retry attempts, maximum event age, and on-success/on-failure destinations for asynchronous invocations
Audit access: Read a function's resource-based policy, add and remove permission statements for AWS services or accounts, and list function URL configurations to find publicly reachable endpoints
Work with layers and tags: List layers and their versions, fetch a layer version's download location, and list, add, or remove function tags
The block authenticates with an AWS access key ID and secret access key scoped to a region. Grant the IAM principal only the Lambda actions the operations you use require — for example lambda:InvokeFunction for invocation, lambda:GetFunction and lambda:ListFunctions for read-only inventory, or lambda:UpdateFunctionCode and lambda:PublishVersion for deployments.
Function code is supplied from Amazon S3 (bucket, key, and optional object version) or from a container image URI in Amazon ECR. Uploading a .zip archive inline is not supported — publish the archive to S3 first, in the same region as the function, then point Create Function or Update Function Code at it.
Use CloudWatch for function logs and metrics, S3 for deployment archives, and SQS for queue-backed event sources.
Invoke functions and read their response payload, create and update functions from Amazon S3 packages or container images, publish versions and aliases, wire up event source mappings, manage concurrency, function URLs, layers, permissions, and tags. Requires an AWS access key and secret access key.
Function name, ARN, or partial ARN (e.g. my-function, or arn:aws:lambda:us-east-1:123456789012:function:my-function)
role
string
Yes
ARN of the function's execution role
runtime
string
No
Runtime identifier such as nodejs22.x or python3.13. Required for .zip packages, omit for container images
handler
string
No
Entry point in your code, such as index.handler. Required for .zip packages
packageType
string
No
Zip for a .zip file archive (default) or Image for a container image
s3Bucket
string
No
Amazon S3 bucket holding the deployment package, in the same region as the function
s3Key
string
No
Amazon S3 key of the .zip package
s3ObjectVersion
string
No
Version of the Amazon S3 object to use
imageUri
string
No
Amazon ECR URI of the container image to deploy
sourceKmsKeyArn
string
No
ARN of the KMS customer managed key that encrypts the function's .zip deployment package
description
string
No
Description of the function
functionTimeout
number
No
Seconds Lambda allows the function to run before stopping it (1-900). Named functionTimeout because the shared tool executor reserves timeout for its own request deadline
memorySize
number
No
Memory available to the function at runtime in MB (128-32768)
ephemeralStorageSize
number
No
Size of the /tmp directory in MB (512-10240)
publish
boolean
No
Publish the first version of the function atomically with creation
environment
json
No
Environment variables as a flat key/value JSON object
tags
json
No
Tags to apply to the function, as a flat key/value JSON object
architectures
array
No
Instruction set architecture: exactly one of x86_64 or arm64
layers
array
No
ARNs of layer versions to add to the function execution environment Pass [] to remove all of them on an update.
vpcSubnetIds
array
No
VPC subnet IDs the function should attach to Pass [] to remove all of them on an update.
vpcSecurityGroupIds
array
No
VPC security group IDs the function should use Pass [] to remove all of them on an update.
tracingMode
string
No
X-Ray tracing mode: Active samples and traces requests, PassThrough only traces sampled requests
deadLetterTargetArn
string
No
ARN of an SQS queue or SNS topic that receives failed asynchronous invocations
kmsKeyArn
string
No
ARN of the KMS customer managed key used to encrypt environment variables and snapshots
snapStartApplyOn
string
No
Set to PublishedVersions to snapshot the initialized environment when a version is published
Function name, ARN, or partial ARN (e.g. my-function, or arn:aws:lambda:us-east-1:123456789012:function:my-function)
role
string
No
ARN of the function's execution role
runtime
string
No
Runtime identifier such as nodejs22.x or python3.13
handler
string
No
Entry point in your code, such as index.handler
description
string
No
Description of the function
functionTimeout
number
No
Seconds Lambda allows the function to run before stopping it (1-900). Named functionTimeout because the shared tool executor reserves timeout for its own request deadline
memorySize
number
No
Memory available to the function at runtime in MB (128-32768)
ephemeralStorageSize
number
No
Size of the /tmp directory in MB (512-10240)
environment
json
No
Environment variables as a flat key/value JSON object. Replaces the existing set
layers
array
No
ARNs of layer versions to add to the function execution environment Pass [] to remove all of them on an update.
vpcSubnetIds
array
No
VPC subnet IDs the function should attach to Pass [] to remove all of them on an update.
vpcSecurityGroupIds
array
No
VPC security group IDs the function should use Pass [] to remove all of them on an update.
tracingMode
string
No
X-Ray tracing mode: Active samples and traces requests, PassThrough only traces sampled requests
deadLetterTargetArn
string
No
ARN of an SQS queue or SNS topic that receives failed asynchronous invocations
kmsKeyArn
string
No
ARN of the KMS customer managed key used to encrypt environment variables and snapshots
snapStartApplyOn
string
No
Set to PublishedVersions to snapshot the initialized environment when a version is published
logFormat
string
No
Format the function sends CloudWatch logs in
logGroup
string
No
CloudWatch log group the function sends logs to
revisionId
string
No
Update the resource only if its current revision ID matches this value
Function name, ARN, or partial ARN (e.g. my-function, or arn:aws:lambda:us-east-1:123456789012:function:my-function)
eventSourceArn
string
No
ARN of the event source. Omit only for self-managed Kafka
enabled
boolean
No
Whether the mapping is active
batchSize
number
No
Maximum records sent to the function in a single batch
maximumBatchingWindowInSeconds
number
No
Seconds to gather records before invoking the function (0-300)
startingPosition
string
No
Position in the stream to start reading from. Required for Kinesis, DynamoDB Streams, and Kafka
startingPositionTimestamp
string
No
ISO 8601 timestamp to start reading from, when startingPosition is AT_TIMESTAMP
parallelizationFactor
number
No
Number of concurrent batches to process from each shard (1-10)
maximumRecordAgeInSeconds
number
No
Discard records older than this. Use -1 for infinite
maximumRetryAttempts
number
No
Retries before a record is discarded. Use -1 for infinite
bisectBatchOnFunctionError
boolean
No
Split a failing batch in two and retry each half
tumblingWindowInSeconds
number
No
Duration of a processing window for stream aggregation (0-900)
maximumConcurrency
number
No
Maximum concurrent function invocations from an SQS event source (2-1000)
topics
array
No
Kafka topic names to consume
queues
array
No
Amazon MQ broker destination queue names
functionResponseTypes
array
No
Set to ReportBatchItemFailures to enable partial batch reporting Pass [] to remove all of them on an update.
filterPatterns
array
No
Event filter patterns, each a JSON string, that decide which records reach the function. Pass [] to remove all filters on an update.
onSuccessDestination
string
No
ARN of the destination that receives successfully processed records
onFailureDestination
string
No
ARN of the destination that receives discarded records
kmsKeyArn
string
No
ARN of the KMS customer managed key used to encrypt filter criteria
tags
json
No
Tags to apply to the event source mapping, as a flat key/value JSON object
sourceAccessConfigurations
json
No
Authentication for an Amazon MQ or self-managed Kafka source, as a JSON array of objects with "type" (e.g. BASIC_AUTH, SASL_SCRAM_512_AUTH, VPC_SUBNET) and "uri" (the Secrets Manager or VPC resource ARN). Pass [] to remove all of them on an update.
documentDbDatabaseName
string
No
DocumentDB database to consume the change stream from
documentDbCollectionName
string
No
DocumentDB collection to consume. Omit to consume the whole database
documentDbFullDocument
string
No
UpdateLookup sends the full document on update, Default sends only the change delta
amazonManagedKafkaConsumerGroupId
string
No
Consumer group ID to join on an Amazon MSK cluster
selfManagedKafkaConsumerGroupId
string
No
Consumer group ID to join on a self-managed Kafka cluster
selfManagedKafkaBootstrapServers
array
No
Bootstrap servers of a self-managed Kafka cluster (host:port). Required instead of eventSourceArn for self-managed Kafka
Maximum records sent to the function in a single batch
maximumBatchingWindowInSeconds
number
No
Seconds to gather records before invoking the function (0-300)
parallelizationFactor
number
No
Number of concurrent batches to process from each shard (1-10)
maximumRecordAgeInSeconds
number
No
Discard records older than this. Use -1 for infinite
maximumRetryAttempts
number
No
Retries before a record is discarded. Use -1 for infinite
bisectBatchOnFunctionError
boolean
No
Split a failing batch in two and retry each half
tumblingWindowInSeconds
number
No
Duration of a processing window for stream aggregation (0-900)
maximumConcurrency
number
No
Maximum concurrent function invocations from an SQS event source (2-1000)
functionResponseTypes
array
No
Set to ReportBatchItemFailures to enable partial batch reporting Pass [] to remove all of them on an update.
filterPatterns
array
No
Event filter patterns, each a JSON string, that decide which records reach the function. Pass [] to remove all filters on an update.
onSuccessDestination
string
No
ARN of the destination that receives successfully processed records
onFailureDestination
string
No
ARN of the destination that receives discarded records
kmsKeyArn
string
No
ARN of the KMS customer managed key used to encrypt filter criteria
sourceAccessConfigurations
json
No
Authentication for an Amazon MQ or self-managed Kafka source, as a JSON array of objects with "type" (e.g. BASIC_AUTH, SASL_SCRAM_512_AUTH, VPC_SUBNET) and "uri" (the Secrets Manager or VPC resource ARN). Pass [] to remove all of them on an update.
documentDbDatabaseName
string
No
DocumentDB database to consume the change stream from
documentDbCollectionName
string
No
DocumentDB collection to consume. Omit to consume the whole database
documentDbFullDocument
string
No
UpdateLookup sends the full document on update, Default sends only the change delta
amazonManagedKafkaConsumerGroupId
string
No
Consumer group ID to join on an Amazon MSK cluster
selfManagedKafkaConsumerGroupId
string
No
Consumer group ID to join on a self-managed Kafka cluster