Class LambdaDestination
Use a Lambda function as a bucket notification destination.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.S3.Notifications
Assembly: Amazon.CDK.AWS.S3.Notifications.dll
Syntax (csharp)
public class LambdaDestination : DeputyBase, IBucketNotificationDestination
Syntax (vb)
Public Class LambdaDestination
Inherits DeputyBase
Implements IBucketNotificationDestination
Remarks
ExampleMetadata: infused
Examples
Function myLambda;
var bucket = Bucket.FromBucketAttributes(this, "ImportedBucket", new BucketAttributes {
BucketArn = "arn:aws:s3:::my-bucket"
});
// now you can just call methods on the bucket
bucket.AddEventNotification(EventType.OBJECT_CREATED, new LambdaDestination(myLambda), new NotificationKeyFilter { Prefix = "home/myusername/*" });
Synopsis
Constructors
LambdaDestination(IFunction) | |
LambdaDestination(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
LambdaDestination(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IBucket) | Registers this resource to receive notifications for the specified bucket. |
Constructors
LambdaDestination(IFunction)
LambdaDestination(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected LambdaDestination(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
LambdaDestination(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected LambdaDestination(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, IBucket)
Registers this resource to receive notifications for the specified bucket.
public virtual IBucketNotificationDestinationConfig Bind(Construct scope, IBucket bucket)
Parameters
Returns
IBucketNotificationDestinationConfig
Remarks
This method will only be called once for each destination/bucket pair and the result will be cached, so there is no need to implement idempotency in each destination.