Readonly architectureProtected Readonly canOptional Readonly deadThe DLQ (as queue) associated with this Lambda Function (this is an optional attribute).
Optional Readonly deadThe DLQ (as topic) associated with this Lambda Function (this is an optional attribute).
Readonly envReadonly functionARN of this function
Readonly functionName of this function
Readonly grantThe principal this Lambda Function is running as
Readonly nodeThe tree node.
stable
Readonly permissionsProtected Readonly physicalReturns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
This value will resolve to one of the following:
"my-awesome-bucket")undefined, when a name should be generated by CloudFormationPrivate propsOptional Readonly roleExecution role associated with this function
Readonly runtimeThe runtime configured for this lambda.
Readonly stackOptional Readonly timeoutThe timeout configured for this lambda.
Access the Connections object
Will fail if not a VPC-enabled Lambda Function
Returns a lambda.Version which represents the current version of this
Lambda function. A new version will be created every time the function's
configuration changes.
You can specify options for this version using the currentVersionOptions
prop when initializing the lambda.Function.
Whether or not this Lambda function was bound to a VPC
If this is is false, trying to access the connections object will fail.
The LogGroup where the Lambda function's logs are made available.
If either logRetention is set or this property is called, a CloudFormation custom resource is added to the stack that
pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention
period (never expire, by default).
Further, if the log group already exists and the logRetention is not set, the custom resource will reset the log retention
to never expire even if it was configured with a different value.
Defines an alias for this function.
The alias will automatically be updated to point to the latest version of the function as it is being updated during a deployment.
declare const fn: lambda.Function;
fn.addAlias('Live');
// Is equivalent to
new lambda.Alias(this, 'AliasLive', {
aliasName: 'Live',
version: fn.currentVersion,
});
The name of the alias
Optional options: AliasOptionsAlias options
Adds an environment variable to this Lambda function. If this is a ref to a Lambda function, this operation results in a no-op.
The environment variable key.
The environment variable's value.
Optional options: EnvironmentOptionsEnvironment variable options.
Apply the given removal policy to this resource
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
A warning will be added to functions under the following conditions:
lambda:InvokeFunction are added to the unqualified function.This applies only to permissions on Lambda functions, not versions or aliases. This function is overridden as a noOp for QualifiedFunctionBase.
Protected generateProtected getReturns an environment-sensitive token that should be used for the
resource's "ARN" attribute (e.g. bucket.bucketArn).
Normally, this token will resolve to arnAttr, but if the resource is
referenced across environments, arnComponents will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName in arnComponents.
The CFN attribute which resolves to the ARN of the resource.
Commonly it will be called "Arn" (e.g. resource.attrArn), but sometimes
it's the CFN resource's ref.
The format of the ARN of this resource. You must
reference this.physicalName somewhere within the ARN in order for
cross-environment references to work.
Protected getReturns an environment-sensitive token that should be used for the
resource's "name" attribute (e.g. bucket.bucketName).
Normally, this token will resolve to nameAttr, but if the resource is
referenced across environments, it will be resolved to this.physicalName,
which will be a concrete name.
The CFN attribute which resolves to the resource's name.
Commonly this is the resource's ref.
Optional tableWrites: booleanProtected warnStatic classifyRecord whether specific properties in the AWS::Lambda::Function resource should
also be associated to the Version resource.
See 'currentVersion' section in the module README for more details.
The property to classify
whether the property should be associated to the version or not.
Static fromStatic fromCreates a Lambda function object which represents a function not defined within this stack.
The parent construct
The name of the lambda construct
the attributes of the function to import
Static fromStatic isStatic isStatic isStatic metricStatic metricStatic metricStatic metricStatic metricStatic metricStatic metricGenerated using TypeDoc
The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64).