LambdaFunction

class aws_cdk.aws_pipes_targets_alpha.LambdaFunction(lambda_function, *, input_transformation=None, invocation_type=None)

Bases: object

(experimental) An EventBridge Pipes target that sends messages to an AWS Lambda Function.

Stability:

experimental

ExampleMetadata:

infused

Example:

# source_queue: sqs.Queue
# target_function: lambda.IFunction


pipe_target = targets.LambdaFunction(target_function,
    invocation_type=targets.LambdaFunctionInvocationType.FIRE_AND_FORGET
)

pipe = pipes.Pipe(self, "Pipe",
    source=SqsSource(source_queue),
    target=pipe_target
)
Parameters:
  • lambda_function (IFunction) –

  • input_transformation (Optional[IInputTransformation]) – (experimental) The input transformation to apply to the message before sending it to the target. Default: - none

  • invocation_type (Optional[LambdaFunctionInvocationType]) – (experimental) Specify whether to invoke the Lambda Function synchronously (REQUEST_RESPONSE) or asynchronously (FIRE_AND_FORGET). Default: LambdaFunctionInvocationType.REQUEST_RESPONSE

Stability:

experimental

Methods

bind(pipe)

(experimental) Bind this target to a pipe.

Parameters:

pipe (IPipe) –

Stability:

experimental

Return type:

TargetConfig

grant_push(grantee)

(experimental) Grant the pipe role to push to the target.

Parameters:

grantee (IRole) –

Stability:

experimental

Return type:

None

Attributes

target_arn

(experimental) The ARN of the target resource.

Stability:

experimental