ProviderProps

class aws_cdk.custom_resources.ProviderProps(*, on_event_handler, is_complete_handler=None, log_retention=None, query_interval=None, total_timeout=None)

Bases: object

Initialization properties for the Provider construct.

Parameters
  • on_event_handler (IFunction) – The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE). This function is responsible to begin the requested resource operation (CREATE/UPDATE/DELETE) and return any additional properties to add to the event, which will later be passed to isComplete. The PhysicalResourceId property must be included in the response.

  • is_complete_handler (Optional[IFunction]) – The AWS Lambda function to invoke in order to determine if the operation is complete. This function will be called immediately after onEvent and then periodically based on the configured query interval as long as it returns false. If the function still returns false and the alloted timeout has passed, the operation will fail. Default: - provider is synchronous. This means that the onEvent handler is expected to finish all lifecycle operations within the initial invocation.

  • log_retention (Optional[RetentionDays]) – The number of days framework log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn’t remove the log retention policy. To remove the retention policy, set the value to INFINITE. Default: logs.RetentionDays.INFINITE

  • query_interval (Optional[Duration]) – Time between calls to the isComplete handler which determines if the resource has been stabilized. The first isComplete will be called immediately after handler and then every queryInterval seconds, and until timeout has been reached or until isComplete returns true. Default: Duration.seconds(5)

  • total_timeout (Optional[Duration]) – Total timeout for the entire operation. The maximum timeout is 2 hours (yes, it can exceed the AWS Lambda 15 minutes) Default: Duration.minutes(30)

Attributes

is_complete_handler

The AWS Lambda function to invoke in order to determine if the operation is complete.

This function will be called immediately after onEvent and then periodically based on the configured query interval as long as it returns false. If the function still returns false and the alloted timeout has passed, the operation will fail.

Default

  • provider is synchronous. This means that the onEvent handler

is expected to finish all lifecycle operations within the initial invocation.

Return type

Optional[IFunction]

log_retention

The number of days framework log events are kept in CloudWatch Logs.

When updating this property, unsetting it doesn’t remove the log retention policy. To remove the retention policy, set the value to INFINITE.

Default

logs.RetentionDays.INFINITE

Return type

Optional[RetentionDays]

on_event_handler

The AWS Lambda function to invoke for all resource lifecycle operations (CREATE/UPDATE/DELETE).

This function is responsible to begin the requested resource operation (CREATE/UPDATE/DELETE) and return any additional properties to add to the event, which will later be passed to isComplete. The PhysicalResourceId property must be included in the response.

Return type

IFunction

query_interval

Time between calls to the isComplete handler which determines if the resource has been stabilized.

The first isComplete will be called immediately after handler and then every queryInterval seconds, and until timeout has been reached or until isComplete returns true.

Default

Duration.seconds(5)

Return type

Optional[Duration]

total_timeout

Total timeout for the entire operation.

The maximum timeout is 2 hours (yes, it can exceed the AWS Lambda 15 minutes)

Default

Duration.minutes(30)

Return type

Optional[Duration]