Skip navigation links

Package software.amazon.awscdk.services.s3.notifications

S3 Bucket Notifications Destinations

See: Description

Package software.amazon.awscdk.services.s3.notifications Description

S3 Bucket Notifications Destinations

---

cdk-constructs: Stable


This module includes integration classes for using Topics, Queues or Lambdas as S3 Notification Destinations.

Example

The following example shows how to send a notification to an SNS topic when an object is created in an S3 bucket:

 // Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
 import software.amazon.awscdk.aws_s3_notifications;
 
 
 Bucket bucket = new Bucket(stack, "Bucket");
 Topic topic = new Topic(stack, "Topic");
 
 bucket.addEventNotification(s3.EventType.getOBJECT_CREATED_PUT(), new SnsDestination(topic));
 
Skip navigation links

Copyright © 2021. All rights reserved.