AliasProps

class aws_cdk.aws_lambda.AliasProps(*, max_event_age=None, on_failure=None, on_success=None, retry_attempts=None, additional_versions=None, description=None, provisioned_concurrent_executions=None, alias_name, version)

Bases: aws_cdk.aws_lambda.AliasOptions

__init__(*, max_event_age=None, on_failure=None, on_success=None, retry_attempts=None, additional_versions=None, description=None, provisioned_concurrent_executions=None, alias_name, version)

Properties for a new Lambda alias.

Parameters
  • max_event_age (Optional[Duration]) – 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 (Optional[IDestination]) – The destination for failed invocations. Default: - no destination

  • on_success (Optional[IDestination]) – The destination for successful invocations. Default: - no destination

  • retry_attempts (Union[int, float, None]) – The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 Default: 2

  • additional_versions (Optional[List[VersionWeight]]) – Additional versions with individual weights this alias points to. Individual additional version weights specified here should add up to (less than) one. All remaining weight is routed to the default version. For example, the config is Example:: version: “1” additionalVersions: [{ version: “2”, weight: 0.05 }] Then 5% of traffic will be routed to function version 2, while the remaining 95% of traffic will be routed to function version 1. Default: No additional versions

  • description (Optional[str]) – Description for the alias. Default: No description

  • provisioned_concurrent_executions (Union[int, float, None]) – Specifies a provisioned concurrency configuration for a function’s alias. Default: No provisioned concurrency

  • alias_name (str) – Name of this alias.

  • version (IVersion) – Function version this alias refers to. Use lambda.addVersion() to obtain a new lambda version to refer to.

Return type

None

Attributes

additional_versions

Additional versions with individual weights this alias points to.

Individual additional version weights specified here should add up to (less than) one. All remaining weight is routed to the default version.

For example, the config is Example:

version: "1"
additionalVersions: [{ version: "2", weight: 0.05 }]

Then 5% of traffic will be routed to function version 2, while the remaining 95% of traffic will be routed to function version 1.

default :default: No additional versions

Return type

Optional[List[VersionWeight]]

alias_name

Name of this alias.

Return type

str

description

Description for the alias.

default :default: No description

Return type

Optional[str]

max_event_age

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

Minimum: 60 seconds Maximum: 6 hours

default :default: Duration.hours(6)

Return type

Optional[Duration]

on_failure

The destination for failed invocations.

default :default: - no destination

Return type

Optional[IDestination]

on_success

The destination for successful invocations.

default :default: - no destination

Return type

Optional[IDestination]

provisioned_concurrent_executions

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

default :default: No provisioned concurrency

Return type

Union[int, float, None]

retry_attempts

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

Minimum: 0 Maximum: 2

default :default: 2

Return type

Union[int, float, None]

version

Function version this alias refers to.

Use lambda.addVersion() to obtain a new lambda version to refer to.

Return type

IVersion