FunctionHook

class aws_cdk.aws_autoscaling_hooktargets.FunctionHook(fn, encryption_key=None)

Bases: object

Use a Lambda Function as a hook target.

Internally creates a Topic to make the connection.

__init__(fn, encryption_key=None)
Parameters
  • fn (IFunction) – Function to invoke in response to a lifecycle event.

  • encryption_key (Optional[IKey]) – If provided, this key is used to encrypt the contents of the SNS topic.

Return type

None

Methods

bind(scope, lifecycle_hook)

Called when this object is used as the target of a lifecycle hook.

Parameters
Return type

LifecycleHookTargetConfig