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

GET Bucket replication

Description

Returns the replication configuration information set on the bucket. For information about replication configuration, see Adding Replication Configuration to a Bucket in the Amazon Simple Storage Service Developer Guide.

This operation requires permissions for the s3:GetReplicationConfiguration action. For more information about permissions, see Using Bucket Policies and User Policies in the Amazon Simple Storage Service Developer Guide.

Requests

Syntax

Copy
GET /?replication HTTP/1.1 Host: bucketname.s3.amazonaws.com Date: date Authorization: authorization string

For more information about authorization, 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

This implementation of GET returns the following response elements.

Name Description
Account

Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to change replica ownership to the AWS account that owns the destination bucket, this is the account ID of the destination bucket owner. For more information, see Cross-Region Replication Additional Configuration: Change Replica Owner in the Amazon Simple Storage Service Developer Guide.

Type: String

Ancestor: Destination

ReplicationConfiguration

Container for replication rules. You can add as many as 1,000 rules. Total replication configuration size can be up to 2 MB.

Type: Container

Children: Rule

Ancestor: None

Role

Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating the objects.

Type: String

Ancestor: Rule

Rule

Container for information about a particular replication rule. Replication configuration must have at least one rule and can contain up to 1,000 rules.

Type: Container

Ancestor: ReplicationConfiguration

ID

Unique identifier for the rule. The value cannot be longer than 255 characters.

Type: String

Ancestor: Rule

Status

The rule is ignored if status is not Enabled.

Type: String

Ancestor: Rule

Valid values: Enabled, Disabled.

Prefix

Object key name prefix identifying one or more objects to which the rule applies. Maximum prefix length can be up to 1,024 characters. Overlapping prefixes are not supported. For more information, see Setting Up Cross-Region Replication in the Amazon Simple Storage Service Developer Guide.

Type: String

Ancestor: Rule

Destination

Container for destination information.

Type: Container

Ancestor: Rule

Bucket

Bucket name for storing replicas of objects identified by the rule.

Type: String

Ancestor: Destination

StorageClass

Storage class to use for the replicated objects. If you did not set the storage class when you configured the cross-region replication (PUT Bucket replication), this field is not returned.

Type: String

Ancestor: Destination

AccessControlTranslation

If you set the owner override option in the replication configuration, this element is returned. It identifies replica ownership.

If this element is not present, replicas are owned by same AWS account that owns the source object.

Type: String

Ancestor: Destination

Owner Identifies the replica ownership.

Type: String

Ancestor: AccessControlTranslation

Default: Storage class of the source object.

Valid values: Destination

If replication configuration directs Amazon S3 to replicate objects created with server-side encryption using an AWS KMS-managed key, the response returns the following additional elements. For more information about replication configuration, see CRR: Replicating Objects Created with SSE Using AWS KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

Name Description
SourceSelectionCriteria

Container that describes additional filters in identifying source objects that you want to replicate.

Type: String

Ancestor: Rule

SseKmsEncryptedObjects

Container element for Status.

Type: String

Ancestor: SourceSelectionCriteria

Status

Flag that directs Amazon S3 whether to replicate objects created with server-side encryption using an AWS KMS-managed key.

Type: String

Ancestor: SseKmsEncryptedObjects

EncryptionConfiguration

Container that provides encryption-related information.

Type: String

Ancestor: Destination

ReplicaKmsKeyID

Provides the AWS KMS Key ID (Key ARN or Alias ARN) for the destination bucket. Amazon S3 uses this key to encrypt replicas.

Type: String

Ancestor: EncryptionConfiguration

Special Errors

Error Code Description HTTP Status Code SOAP Fault Code Prefix
NoSuchReplicationConfiguration The replication configuration does not exist. 404 Not Found Client

For general information about Amazon S3 errors and a list of error codes, see Error Responses.

Examples

Example 1: Retrieve Replication Configuration Information

The following example GET request retrieves replication configuration information set for the examplebucket bucket.

Copy
GET /?replication HTTP/1.1 Host: examplebucket.s3.amazonaws.com Date: Tue, 10 Feb 2015 00:17:21 GMT Authorization: authorization string

The following example response shows that replication is enabled on the bucket, and the empty prefix indicates that Amazon S3 will replicate all objects created in the examplebucket bucket. The Destination element shows the target bucket where Amazon S3 creates the object replicas and the storage class (STANDARD_IA) that Amazon S3 uses when creating replicas.

Amazon S3 assumes the specified role to replicate objects on behalf of the bucket owner, which is the AWS account that created the bucket.

Copy
HTTP/1.1 200 OK x-amz-id-2: ITnGT1y4RyTmXa3rPi4hklTXouTf0hccUjo0iCPjz6FnfIutBj3M7fPGlWO2SEWp x-amz-request-id: 51991C342example Date: Tue, 10 Feb 2015 00:17:23 GMT Server: AmazonS3 Content-Length: contentlength <?xml version="1.0" encoding="UTF-8"?> <ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Rule> <ID>rule1</ID> <Status>Enabled</Status> <Prefix></Prefix> <Destination> <Bucket>arn:aws:s3:::exampletargetbucket</Bucket> <StorageClass>STANDARD_IA</StorageClass> </Destination> </Rule> <Role>arn:aws:iam::35667example:role/CrossRegionReplicationRoleForS3</Role> </ReplicationConfiguration>