Enabling Amazon EventBridge
You can enable Amazon EventBridge using the S3 console, Amazon Command Line Interface (Amazon CLI), or Amazon S3 REST API.
To enable EventBridge event delivery in the S3 console.
Sign in to the Amazon Web Services Management Console and open the Amazon S3 console at https://console.amazonaws.cn/s3/
. -
In the Buckets list, choose the name of the bucket that you want to enable events for.
-
Choose Properties.
-
Navigate to the Event Notifications section and find the Amazon EventBridge subsection. Choose Edit.
-
Under Send notifications to Amazon EventBridge for all events in this bucket choose On.
Note
After you enable EventBridge, it takes around five minutes for the changes to take effect.
The following example creates a bucket notification configuration for bucket
amzn-s3-demo-bucket1
with Amazon EventBridge enabled.
aws s3api put-bucket-notification-configuration --bucket
amzn-s3-demo-bucket1
--notification-configuration='{ "EventBridgeConfiguration": {} }'
You can programmatically enable Amazon EventBridge on a bucket by calling the Amazon S3 REST API. For more information see, see PutBucketNotificationConfiguration in the Amazon Simple Storage Service API Reference.
The following example shows the XML used to create a bucket notification configuration with Amazon EventBridge enabled.
<NotificationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <EventBridgeConfiguration> </EventBridgeConfiguration> </NotificationConfiguration>
Creating EventBridge rules
Once enabled you can create Amazon EventBridge rules for certain tasks. For example, you can send email notifications when an object is created. For a full tutorial, see Tutorial: Send a notification when an Amazon S3 object is created in the Amazon EventBridge User Guide.