VersionProps — AWS Cloud Development Kit 1.204.0 documentation (original) (raw)

AWS Cloud Development Kit

class aws_cdk.aws_lambda.VersionProps(*, max_event_age=None, on_failure=None, on_success=None, retry_attempts=None, code_sha256=None, description=None, provisioned_concurrent_executions=None, removal_policy=None, lambda_)

Bases: VersionOptions

Properties for a new Lambda version.

Parameters:

ExampleMetadata:

infused

Example:

fn: lambda.Function

version = lambda_.Version(self, "MyVersion", lambda_=fn )

Attributes

code_sha256

SHA256 of the version of the Lambda source code.

Specify to validate that you’re deploying the right version.

Default:

No validation is performed

description

Description of the version.

Default:

Description of the Lambda

lambda_

Function to get the value of.

max_event_age

The maximum age of a request that Lambda sends to a function for processing.

Minimum: 60 seconds Maximum: 6 hours

Default:

Duration.hours(6)

on_failure

The destination for failed invocations.

Default:

on_success

The destination for successful invocations.

Default:

provisioned_concurrent_executions

Specifies a provisioned concurrency configuration for a function’s version.

Default:

No provisioned concurrency

removal_policy

Whether to retain old versions of this function when a new version is created.

Default:

RemovalPolicy.DESTROY

retry_attempts

The maximum number of times to retry when the function returns an error.

Minimum: 0 Maximum: 2

Default:

2