Skip to main content

Bucket Notifications API for AWS S3

Project description

S3 Bucket Notifications Destinations

---

cdk-constructs: Stable


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

aws-cdk.aws-s3-notifications-1.135.0.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_cdk.aws_s3_notifications-1.135.0-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file aws-cdk.aws-s3-notifications-1.135.0.tar.gz.

File metadata

  • Download URL: aws-cdk.aws-s3-notifications-1.135.0.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.5

File hashes

Hashes for aws-cdk.aws-s3-notifications-1.135.0.tar.gz
Algorithm Hash digest
SHA256 a101d225bf73ffb201acb5f7b7c01a2708fac26cf41a8f2f615344006d216621
MD5 be3bc5052c8f83b96b6dacdd3c744124
BLAKE2b-256 125fea9dbfa1c29ab21562d455aa6a50363238fe599520e8891fd020fc8caa9f

See more details on using hashes here.

File details

Details for the file aws_cdk.aws_s3_notifications-1.135.0-py3-none-any.whl.

File metadata

  • Download URL: aws_cdk.aws_s3_notifications-1.135.0-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.5

File hashes

Hashes for aws_cdk.aws_s3_notifications-1.135.0-py3-none-any.whl
Algorithm Hash digest
SHA256 311216fd1c5fe825328ce9e83ef93d25fa86ef09eb1b55c550daa383f0ae4b90
MD5 d2a40913468c104347b6b47b59c84add
BLAKE2b-256 a683df6753781eae14c0112da803c61a3e17e5ab42bc695e7bd82e097f05f5cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page