2019-04-02 11:46:27 +00:00
|
|
|
=====================================
|
|
|
|
S3 Bucket Notifications Compatibility
|
|
|
|
=====================================
|
|
|
|
|
2022-11-21 18:04:53 +00:00
|
|
|
Ceph's `Bucket Notifications`_ API follows `AWS S3 Bucket Notifications API`_. However, some differences exist, as listed below.
|
2019-08-22 13:31:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Compatibility is different depending on which of the above mechanism is used
|
2019-04-02 11:46:27 +00:00
|
|
|
|
2019-04-03 10:29:47 +00:00
|
|
|
Supported Destination
|
2019-08-22 13:31:01 +00:00
|
|
|
---------------------
|
2019-04-02 11:46:27 +00:00
|
|
|
|
2019-04-03 10:29:47 +00:00
|
|
|
AWS supports: **SNS**, **SQS** and **Lambda** as possible destinations (AWS internal destinations).
|
2021-09-22 03:05:40 +00:00
|
|
|
Currently, we support: **HTTP/S**, **Kafka** and **AMQP**. And also support pulling and acking of events stored in Ceph (as an internal destination).
|
2019-04-03 10:29:47 +00:00
|
|
|
|
2020-03-26 22:36:19 +00:00
|
|
|
We are using the **SNS** ARNs to represent the **HTTP/S**, **Kafka** and **AMQP** destinations.
|
2019-04-03 10:29:47 +00:00
|
|
|
|
|
|
|
Notification Configuration XML
|
2019-04-02 11:46:27 +00:00
|
|
|
------------------------------
|
|
|
|
|
|
|
|
Following tags (and the tags inside them) are not supported:
|
|
|
|
|
2019-04-03 10:29:47 +00:00
|
|
|
+-----------------------------------+----------------------------------------------+
|
|
|
|
| Tag | Remaks |
|
|
|
|
+===================================+==============================================+
|
|
|
|
| ``<QueueConfiguration>`` | not needed, we treat all destinations as SNS |
|
|
|
|
+-----------------------------------+----------------------------------------------+
|
|
|
|
| ``<CloudFunctionConfiguration>`` | not needed, we treat all destinations as SNS |
|
|
|
|
+-----------------------------------+----------------------------------------------+
|
2019-04-02 11:46:27 +00:00
|
|
|
|
2019-08-22 13:31:01 +00:00
|
|
|
REST API Extension
|
2019-04-02 11:46:27 +00:00
|
|
|
------------------
|
|
|
|
|
2019-08-22 13:31:01 +00:00
|
|
|
Ceph's bucket notification API has the following extensions:
|
2019-04-03 10:29:47 +00:00
|
|
|
|
2019-04-11 09:23:17 +00:00
|
|
|
- Deletion of a specific notification, or all notifications on a bucket, using the ``DELETE`` verb
|
|
|
|
|
|
|
|
- In S3, all notifications are deleted when the bucket is deleted, or when an empty notification is set on the bucket
|
|
|
|
|
2019-08-22 13:31:01 +00:00
|
|
|
- Getting the information on a specific notification (when more than one exists on a bucket)
|
|
|
|
|
|
|
|
- In S3, it is only possible to fetch all notifications on a bucket
|
2019-04-02 11:46:27 +00:00
|
|
|
|
2019-09-10 15:53:21 +00:00
|
|
|
- In addition to filtering based on prefix/suffix of object keys we support:
|
|
|
|
|
|
|
|
- Filtering based on regular expression matching
|
|
|
|
|
|
|
|
- Filtering based on metadata attributes attached to the object
|
|
|
|
|
2019-11-24 13:33:00 +00:00
|
|
|
- Filtering based on object tags
|
|
|
|
|
2020-03-28 11:20:10 +00:00
|
|
|
- Each one of the additional filters extends the S3 API and using it will require extension of the client SDK (unless you are using plain HTTP).
|
2020-03-26 22:36:19 +00:00
|
|
|
|
2019-09-10 15:53:21 +00:00
|
|
|
- Filtering overlapping is allowed, so that same event could be sent as different notification
|
|
|
|
|
|
|
|
|
2019-04-02 11:46:27 +00:00
|
|
|
Unsupported Fields in the Event Record
|
|
|
|
--------------------------------------
|
|
|
|
|
2022-11-21 18:04:53 +00:00
|
|
|
The records sent for bucket notification follows the format described in: `Event Message Structure`_.
|
2022-11-20 18:03:03 +00:00
|
|
|
However, the ``requestParameters.sourceIPAddress`` field will be sent empty.
|
|
|
|
|
2019-04-02 11:46:27 +00:00
|
|
|
|
|
|
|
Event Types
|
|
|
|
-----------
|
|
|
|
|
2022-11-20 18:03:03 +00:00
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| Event | Note |
|
|
|
|
+========================================================+=========================================+
|
|
|
|
| ``s3:ObjectCreated:*`` | Supported |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectCreated:Put`` | Supported |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectCreated:Post`` | Supported |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectCreated:Copy`` | Supported |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectCreated:CompleteMultipartUpload`` | Supported |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectRemoved:*`` | Supported |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectRemoved:Delete`` | Supported |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectRemoved:DeleteMarkerCreated`` | Supported |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectLifecycle:Expiration:Current`` | Ceph extension |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectLifecycle:Expiration:NonCurrent`` | Ceph extension |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectLifecycle:Expiration:DeleteMarker`` | Ceph extension |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectLifecycle:Expiration:AbortMultipartUpload`` | Defined, Ceph extension (not generated) |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectLifecycle:Transition:Current`` | Ceph extension |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectLifecycle:Transition:NonCurrent`` | Ceph extension |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectSynced:*`` | Ceph extension |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectSynced:Create`` | Ceph Extension |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectSynced:Delete`` | Defined, Ceph extension (not generated) |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectSynced:DeletionMarkerCreated`` | Defined, Ceph extension (not generated) |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectRestore:Post`` | Not applicable |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ObjectRestore:Complete`` | Not applicable |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
|
|
|
| ``s3:ReducedRedundancyLostObject`` | Not applicable |
|
|
|
|
+--------------------------------------------------------+-----------------------------------------+
|
2019-04-02 11:46:27 +00:00
|
|
|
|
2021-07-15 13:40:06 +00:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
The ``s3:ObjectRemoved:DeleteMarkerCreated`` event presents information on the latest version of the object
|
|
|
|
|
2021-07-14 08:38:42 +00:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
In case of multipart upload, an ``ObjectCreated:CompleteMultipartUpload`` notification will be sent at the end of the process.
|
2022-02-27 16:24:09 +00:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
2022-06-26 03:09:51 +00:00
|
|
|
The ``s3:ObjectSynced:Create`` event is sent when an object successfully syncs to a zone. It must be explicitly set for each zone.
|
2021-07-14 08:38:42 +00:00
|
|
|
|
2019-08-22 13:31:01 +00:00
|
|
|
Topic Configuration
|
|
|
|
-------------------
|
|
|
|
In the case of bucket notifications, the topics management API will be derived from `AWS Simple Notification Service API`_.
|
|
|
|
Note that most of the API is not applicable to Ceph, and only the following actions are implemented:
|
|
|
|
|
|
|
|
- ``CreateTopic``
|
|
|
|
- ``DeleteTopic``
|
|
|
|
- ``ListTopics``
|
|
|
|
|
2020-01-13 10:48:24 +00:00
|
|
|
We also have the following extensions to topic configuration:
|
|
|
|
|
|
|
|
- In ``GetTopic`` we allow fetching a specific topic, instead of all user topics
|
|
|
|
- In ``CreateTopic``
|
|
|
|
|
|
|
|
- we allow setting endpoint attributes
|
2021-09-22 03:05:40 +00:00
|
|
|
- we allow setting opaque data that will be sent to the endpoint in the notification
|
2019-08-22 13:31:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
.. _AWS Simple Notification Service API: https://docs.aws.amazon.com/sns/latest/api/API_Operations.html
|
2019-04-03 10:29:47 +00:00
|
|
|
.. _AWS S3 Bucket Notifications API: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
|
|
|
.. _Event Message Structure: https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html
|
2019-08-22 13:31:01 +00:00
|
|
|
.. _`Bucket Notifications`: ../notifications
|
2023-02-13 22:18:49 +00:00
|
|
|
.. _`boto3 SDK filter extensions`: https://github.com/ceph/ceph/tree/main/examples/rgw/boto3
|