Class LambdaDestination
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.s3.notifications.LambdaDestination
- All Implemented Interfaces:
IBucketNotificationDestination,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:46.293Z")
@Stability(Stable)
public class LambdaDestination
extends software.amazon.jsii.JsiiObject
implements IBucketNotificationDestination
Use a Lambda function as a bucket notification destination.
Example:
Function myLambda;
IBucket bucket = Bucket.fromBucketAttributes(this, "ImportedBucket", BucketAttributes.builder()
.bucketArn("arn:aws:s3:::amzn-s3-demo-bucket")
.build());
// now you can just call methods on the bucket
bucket.addEventNotification(EventType.OBJECT_CREATED, new LambdaDestination(myLambda), NotificationKeyFilter.builder()
.prefix("home/myusername/*")
.build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.s3.IBucketNotificationDestination
IBucketNotificationDestination.Jsii$Default, IBucketNotificationDestination.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLambdaDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedLambdaDestination(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind(software.constructs.Construct scope, IBucketRef bucket) Registers this resource to receive notifications for the specified bucket.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
LambdaDestination
protected LambdaDestination(software.amazon.jsii.JsiiObjectRef objRef) -
LambdaDestination
protected LambdaDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
LambdaDestination
- Parameters:
fn- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public BucketNotificationDestinationConfig bind(@NotNull software.constructs.Construct scope, @NotNull IBucketRef bucket) Registers this resource to receive notifications for the specified bucket.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.
- Specified by:
bindin interfaceIBucketNotificationDestination- Parameters:
scope- This parameter is required.bucket- This parameter is required.
-