Menu
Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

GET Bucket notification

Description

This implementation of the GET operation uses the notification subresource to return the notification configuration of a bucket.

If notifications are not enabled on the bucket, the operation returns an empty NotificationConfiguration element.

By default, you must be the bucket owner to read the notification configuration of a bucket. However, the bucket owner can use a bucket policy to grant permission to other users to read this configuration with the s3:GetBucketNotification permission.

For more information about setting and reading the notification configuration on a bucket, see Setting Up Notification of Bucket Events. For more information about bucket policies, see Using Bucket Policies.

Requests

Syntax

GET /?notification HTTP/1.1
Host: BucketName.s3.amazonaws.com
Date: date
Authorization: authorization string (see Authenticating Requests (AWS Signature Version
		4))

Request Parameters

This implementation of the operation does not use request parameters.

Request Headers

This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.

Request Elements

This implementation of the operation does not use request elements.

Responses

Response Headers

This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.

Response Elements

Name Description
CloudFunction

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of the specified type.

Type: String

Ancestry: CloudFunctionConfiguration

CloudFunctionConfiguration

Container for specifying the AWS Lambda notification configuration.

Type: Container

Children: An Id, CloudFunction, and one, or more Event.

Ancestry: NotificationConfiguration

Event

Bucket event for which to send notifications.

Note

You can add multiple instance of QueueConfiguration, TopicConfiguration, or CloudFunctionConfiguration to the notification configuration.

Type: String

Valid Values: For a list of supported event types, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

Ancestry: TopicConfiguration and QueueConfiguration

Filter

Container for S3Key, which contains object key name filtering rules. For information about key name filtering, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

Type: Container

Children: S3Key

Ancestor: TopicConfiguration, QueueConfiguration, or CloudFunctionConfiguration.

FilterRule

Container for key value pair that defines the criteria for the filter rule.

Container S3Key

Type: Container

Children: Name and Value

Ancestor: S3Key

Id

Optional unique identifier for each of the configurations in the NotificationConfiguration. If you don't provide, Amazon S3 will assign an ID.

Type: String

Ancestry: TopicConfiguration and QueueConfiguration

Name

Object key name prefix or suffix identifying one or more objects to which the filtering rule applies. Maximum prefix length can be up to 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, go to Configuring Event Notifications in the Amazon Simple Storage Service Developer Guide.

Type: String

Ancestor: FilterRule

Valid values: prefix or suffix

NotificationConfiguration

Container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off on the bucket.

Type: Container

Children: one or more TopicConfiguration, QueueConfiguration, and CloudFunctionConfiguration elements.

Ancestry: None

Queue

Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects events of specified type.

Type: String

Ancestry: TopicConfiguration

QueueConfiguration

Container for specifying a configuration when you want Amazon S3 to publish events to an Amazon Simple Queue Service (Amazon SQS) queue.

Type: Container

Children: An Id, Topic, and one, or more Event.

Ancestry: NotificationConfiguration

S3Key

Container for object key name prefix and suffix filtering rules.

Type: Container

Children: One or more FilterRule

Ancestor: Filter

Topic

Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects events of specified type.

Type: String

Ancestry: TopicConfiguration

TopicConfiguration

Container for specifying the configuration when you want Amazon S3 to publish events to an Amazon Simple Notification Service (Amazon SNS) topic.

Type: Container

Children: An Id, Topic, and one, or more Event.

Ancestry: NotificationConfiguration

Value

Specifies the object key name prefix or suffix to filter on.

Type: String

Ancestor: FilterRule

Special Errors

This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.

Examples

Sample Request

This request returns the notification configuration on the bucket quotes.s3.amazonaws.com.

GET ?notification HTTP/1.1 
Host: quotes.s3.amazonaws.com
Date: Wed, 15 Oct 2014 16:59:03 GMT
Authorization: authorization string

Sample Response

This response returns that the notification configuration for the specified bucket.

HTTP/1.1 200 OK
x-amz-id-2: YgIPIfBiKa2bj0KMgUAdQkf3ShJTOOpXUueF6QKo
x-amz-request-id: 236A8905248E5A02
Date: Wed, 15 Oct 2014 16:59:04 GMT
Server: AmazonS3
<?xml version="1.0" encoding="UTF-8"?>

<NotificationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <TopicConfiguration>
    <Id>YjVkM2Y0YmUtNGI3NC00ZjQyLWEwNGItNDIyYWUxY2I0N2M4</Id>
    <Topic>arn:aws:sns:us-east-1:account-id:s3notificationtopic2</Topic>
    <Event>s3:ReducedRedundancyLostObject</Event>
    <Event>s3:ObjectCreated:*</Event>
  </TopicConfiguration>
</NotificationConfiguration>