LambdaDestination
- class aws_cdk.aws_logs_destinations.LambdaDestination(fn, *, add_permissions=None)
Bases:
object
Use a Lambda Function as the destination for a log subscription.
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_logs_destinations as destinations # fn: lambda.Function # log_group: logs.LogGroup logs.SubscriptionFilter(self, "Subscription", log_group=log_group, destination=destinations.LambdaDestination(fn), filter_pattern=logs.FilterPattern.all_terms("ERROR", "MainThread"), filter_name="ErrorInMainThread" )
LambdaDestinationOptions.
- Parameters:
fn (
IFunction
) –add_permissions (
Optional
[bool
]) – Whether or not to add Lambda Permissions. Default: true
Methods
- bind(scope, log_group)
Return the properties required to send subscription events to this destination.
If necessary, the destination can use the properties of the SubscriptionFilter object itself to configure its permissions to allow the subscription to write to it.
The destination may reconfigure its own permissions in response to this function call.
- Parameters:
- Return type: