Skip to main content

GetBucketNotification

GetBucketNotification reports which event notifications a bucket sends, in the older format Amazon S3 used before GetBucketNotificationConfiguration. Event notifications are not part of STRG, so there is never anything to report: the operation checks that the bucket exists and answers with an empty NotificationConfiguration document. Tools that read it while describing a bucket get a clean answer and carry on unchanged.

Deprecated

GetBucketNotification is deprecated, and GetBucketNotificationConfiguration is its successor and the better choice for new code. Both send the same request and get the same answer from STRG. The AWS SDK for JavaScript v3 no longer has a command for this operation.

Good to know on STRG
  • Event notifications are not part of STRG, so the answer never contains a TopicConfiguration, QueueConfiguration or CloudFunctionConfiguration.
  • PutBucketNotification and PutBucketNotificationConfiguration are answered with 501 NotImplemented, so a client knows straight away.
  • x-amz-expected-bucket-owner is welcome and has nothing to check: a key only ever reaches buckets of its own account.

When you'd use it​

  • Older tools that describe a bucket. Scripts and libraries written against older AWS SDKs read the notification configuration with this form of the request while listing a bucket's settings. On STRG the request succeeds with an empty document, so the description completes without errors.
  • Checking that nothing is configured. A migration or audit script that confirms a bucket sends no events before moving on hears exactly that.

Request​

GET /?notification HTTP/1.1
Host: my-bucket.s3.eu-central-1.strg.com
Authorization: AWS4-HMAC-SHA256 Credential=...
x-amz-date: 20260926T120000Z
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

The path-style form is GET /my-bucket?notification on s3.eu-central-1.strg.com - Addressing explains both.

Permissions​

The access key needs Read bucket settings (buckets:read-config). Every access key holds it, whether it covers all buckets or only some - a key scoped to specific buckets reads only those. Access keys has the details.

URI parameters​

NameTypeRequiredDescription
BucketStringYesThe bucket whose notification configuration to read.
notificationFlagYesSelects this operation. Sent with no value.

Any other query parameter is answered with 501 NotImplemented, so a client knows straight away that it has no effect here.

Request headers​

NameTypeRequiredDescription
x-amz-expected-bucket-ownerStringNoWelcome, with nothing to check: an access key only ever reaches its own account's buckets.

Request body​

None.

Response​

A successful request answers 200 OK with an XML body.

Response headers​

NameDescription
Content-Typeapplication/xml.
x-amz-request-idThe request ID, handy for a support request.

Response body​

The root element is always empty, and the three containers Amazon S3 can send inside it never appear:

ElementTypeDescription
NotificationConfigurationContainerThe root element. Always empty on STRG.
TopicConfigurationContainerNot sent. Amazon S3 describes a notification topic here.
QueueConfigurationContainerNot sent. Amazon S3 describes a notification queue here.
CloudFunctionConfigurationContainerNot sent. Amazon S3 describes a notification function here.
<?xml version="1.0" encoding="UTF-8"?>
<NotificationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>

Errors​

These are the errors this request can return, and the situation behind each one.

CodeHTTP statusWhen
NoSuchBucket404The bucket does not exist, belongs to another account, is in a region other than the endpoint's, or the account stores nothing in the endpoint's region yet.
AccessDenied403The access key is scoped to buckets that do not include this one, or the account is not active.
InvalidAccessKeyId403The access key does not exist, has expired or been revoked - or it was created moments ago and is not usable yet in a region where the account already stores data, in which case the same request works shortly afterwards.
SignatureDoesNotMatch403The request signature does not match.
RequestTimeTooSkewed403The request time is more than 15 minutes from the server's.
AuthorizationHeaderMalformed400The signature's credential scope names a region other than the endpoint's.
NotImplemented501The request carries a query parameter this operation does not accept.
SlowDown503Too many requests. The Retry-After header says when a retry is welcome; the AWS SDKs retry on their own.
ServiceUnavailable503A temporary failure; the same request can be retried.
InternalError500An unexpected failure while checking the bucket; the same request can be retried.

Differences from Amazon S3​

The table lists each place where STRG behaves differently, and what that means for a client.

AspectAmazon S3STRG
Event notificationsConfigurable per bucket, delivered to a topic, queue or functionNot part of STRG. The answer is always an empty NotificationConfiguration
Setting themPutBucketNotification, PutBucketNotificationConfigurationAnswered with 501 NotImplemented
Bucket in another region301 redirect with x-amz-bucket-region404 NoSuchBucket. A bucket is reached through its own regional endpoint.
x-amz-expected-bucket-ownerChecked against the bucket ownerWelcome, with nothing to check

Examples​

Reading the notification configuration of my-bucket in eu-central-1:

aws s3api get-bucket-notification \
--bucket my-bucket \
--endpoint-url https://s3.eu-central-1.strg.com \
--region eu-central-1
View as Markdown