EventInvokeConfigOptions

class aws_cdk.aws_lambda.EventInvokeConfigOptions(*, max_event_age=None, on_failure=None, on_success=None, retry_attempts=None)

Bases: object

__init__(*, max_event_age=None, on_failure=None, on_success=None, retry_attempts=None)

Options to add an EventInvokeConfig to a function.

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

Return type

None

Attributes

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]

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]