LambdaFunction

class aws_cdk.aws_events_targets.LambdaFunction(handler, *, event=None)

Bases: object

Use an AWS Lambda function as an event rule target.

__init__(handler, *, event=None)
Parameters
  • handler (IFunction) –

  • props

  • event (Optional[RuleTargetInput]) – The event to send to the Lambda. This will be the payload sent to the Lambda Function. Default: the entire CloudWatch event

Return type

None

Methods

bind(rule, _id=None)

Returns a RuleTarget that can be used to trigger this Lambda as a result from a CloudWatch event.

Parameters
  • rule (IRule) –

  • _id (Optional[str]) –

Return type

RuleTargetConfig