Bucket Notifications API for AWS S3
Project description
S3 Bucket Notifications Destinations
---This module includes integration classes for using Topics, Queues or Lambdas as S3 Notification Destinations.
Examples
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 from non-compiling source. May contain errors.
import aws_cdk.aws_s3_notifications as s3n
bucket = s3.Bucket(stack, "Bucket")
topic = sns.Topic(stack, "Topic")
bucket.add_event_notification(s3.EventType.OBJECT_CREATED_PUT, s3n.SnsDestination(topic))
The following example shows how to send a notification to a Lambda function when an object is created in an S3 bucket:
# Example automatically generated from non-compiling source. May contain errors.
import aws_cdk.aws_s3_notifications as s3n
bucket = s3.Bucket(stack, "Bucket")
fn = Function(self, "MyFunction", {
"runtime": Runtime.NODEJS_12_X,
"handler": "index.handler",
"code": Code.from_asset(path.join(__dirname, "lambda-handler"))
})
bucket.add_event_notification(s3.EventType.OBJECT_CREATED, s3n.LambdaDestination(fn))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for aws-cdk.aws-s3-notifications-1.136.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b240b2499a2f556da7d748d59e60b1d3801531a4b474a2f1832641eeece2c090 |
|
MD5 | 77136234a3ce669b7e022b1d74a38070 |
|
BLAKE2b-256 | 92d1421b8d69ce809aca85070882b429fba7402ced03af443a50d62687cb796a |
Close
Hashes for aws_cdk.aws_s3_notifications-1.136.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 770453517e820cb85b807290aa29048c480960491ce97a5eb4e9377558313503 |
|
MD5 | a4fb6a7270adbca65bbd6524c5394a7f |
|
BLAKE2b-256 | 49b147a060bc02aa20f1e045e5c0687109b7ca8f075c11497b44b13d3eec8a88 |