23 CDK constructs available in aws-cdk-lib/aws-lambda
import * as lambda from 'aws-cdk-lib/aws-lambda';Higher-level abstractions with sensible defaults and convenience methods.
A new alias to a particular version of a Lambda function.
A Lambda capacity provider that manages compute resources for Lambda functions.
Defines a Code Signing Config.
Create a lambda function where the handler is a docker image.
Configure options for asynchronous invocation on a version or an alias. By default, Lambda retries an asynchronous invocation twice if the function returns an error. It retains events in a queue for up to six hours. When an event fails all processing attempts or stays in the asynchronous invocation queue for too long, Lambda discards it.
Defines a Lambda EventSourceMapping resource. Usually, you won't need to define the mapping yourself. This will usually be done by event sources. For example, to add an SQS event source to a function: ```ts import * as sqs from 'aws-cdk-lib/aws-sqs'; import * as eventsources from 'aws-cdk-lib/aws-lambda-event-sources'; declare const handler: lambda.Function; declare const queue: sqs.Queue; handler.addEventSource(new eventsources.SqsEventSource(queue)); ``` The `SqsEventSource` class will automatically create the mapping, and will also modify the Lambda's execution role so it can consume messages from the queue.
This construct does not yet reproduce all features from the underlying resource library.
Defines a Lambda function url.
Defines a new Lambda Layer version.
A Lambda that will only ever be added to a stack once. This construct is a way to guarantee that the lambda function will be guaranteed to be part of the stack, once and only once, irrespective of how many times the construct is declared to be part of the stack. This is guaranteed as long as the `uuid` property and the optional `lambdaPurpose` property stay the same whenever they're declared into the stack.
Tag the current state of a Function with a Version number. Avoid using this resource directly. If you need a Version object, use `function.currentVersion` instead. That will add a Version object to your template, and make sure the Version is invalidated whenever the Function object changes. If you use the `Version` resource directly, you are responsible for making sure it is invalidated (by changing its logical ID) whenever necessary. Version resources can then be used in `Alias` resources to refer to a particular deployment of a Lambda. If you want to ensure that you're associating the right version with the right deployment, specify the `codeSha256` property while creating the `Version.
Direct CloudFormation resource mappings. One-to-one with CloudFormation resource types.
AWS::Lambda::AliasAWS::Lambda::CapacityProviderAWS::Lambda::CodeSigningConfigAWS::Lambda::EventInvokeConfigAWS::Lambda::EventSourceMappingAWS::Lambda::FunctionAWS::Lambda::LayerVersionAWS::Lambda::LayerVersionPermissionAWS::Lambda::PermissionAWS::Lambda::UrlAWS::Lambda::VersionEverything you need to know about AWS Lambda on one page. HD quality, print-friendly.
Download Free Infographicaws-cdk-lib/aws-lambda