EventInvokeConfigProps — AWS Cloud Development Kit 1.204.0 documentation (original) (raw)
class aws_cdk.aws_lambda.EventInvokeConfigProps(*, max_event_age=None, on_failure=None, on_success=None, retry_attempts=None, function, qualifier=None)
Bases: EventInvokeConfigOptions
Properties for an EventInvokeConfig.
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 - function (IFunction) – The Lambda function.
- qualifier (
Optional
[str
]) – The qualifier. Default: - latest version
ExampleMetadata:
fixture=_generated
Example:
The code below shows an example of how to instantiate this type.
The values are placeholders you should change.
import aws_cdk.aws_lambda as lambda_ import aws_cdk.core as cdk
destination: lambda.IDestination
function_: lambda.Function
event_invoke_config_props = lambda.EventInvokeConfigProps( function=function_,
# the properties below are optional
max_event_age=cdk.Duration.minutes(30),
on_failure=destination,
on_success=destination,
qualifier="qualifier",
retry_attempts=123
)
Attributes
function
The Lambda function.
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:
- no destination
on_success
The destination for successful invocations.
Default:
- no destination
qualifier
The qualifier.
Default:
- latest version
retry_attempts
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2
Default:
2