ProviderProps

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

Bases: object

__init__(*, on_event_handler, is_complete_handler=None, query_interval=None, total_timeout=None)

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.

  • 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)

stability :stability: experimental

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 :default:

  • provider is synchronous. This means that the onEvent handler is expected to finish all lifecycle operations within the initial invocation.

stability :stability: experimental

Return type

Optional[IFunction]

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.

stability :stability: experimental

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 :default: Duration.seconds(5)

stability :stability: experimental

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 :default: Duration.minutes(30)

stability :stability: experimental

Return type

Optional[Duration]