AliasOptions¶
-
class
aws_cdk.aws_lambda.
AliasOptions
(*, max_event_age=None, on_failure=None, on_success=None, retry_attempts=None, additional_versions=None, description=None, provisioned_concurrent_executions=None)¶ Bases:
aws_cdk.aws_lambda.EventInvokeConfigOptions
Options for
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 destinationon_success (
Optional
[IDestination
]) – The destination for successful invocations. Default: - no destinationretry_attempts (
Union
[int
,float
,None
]) – The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 Default: 2additional_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 versionsdescription (
Optional
[str
]) – Description for the alias. Default: No descriptionprovisioned_concurrent_executions (
Union
[int
,float
,None
]) – Specifies a provisioned concurrency configuration for a function’s alias. Default: No provisioned concurrency
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
No additional versions
- Return type
Optional
[List
[VersionWeight
]]
-
description
¶ Description for the alias.
- 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
Duration.hours(6)
- Return type
Optional
[Duration
]
-
on_failure
¶ The destination for failed invocations.
- Default
no destination
- Return type
Optional
[IDestination
]
-
on_success
¶ The destination for successful invocations.
- Default
no destination
- Return type
Optional
[IDestination
]
-
provisioned_concurrent_executions
¶ Specifies a provisioned concurrency configuration for a function’s alias.
- 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
2
- Return type
Union
[int
,float
,None
]