Create a bucket replication configuration
Creates a replication configuration or replaces an existing one.
Syntax
PUT https://{endpoint}/{bucket-name}?replication # path style
PUT https://{bucket-name}.{endpoint}?replication # virtual host style
Payload elements
The body of the request must contain an XML block with the following schema:
| Element | Type | Children | Ancestor | Required | Constraint | Description |
|---|---|---|---|---|---|---|
| ReplicationConfiguration | Container | Rule | Yes | Limit 1 | Top-level container | |
| Rule | Container |
ID Status Filter DeleteMarkerReplication Destination Pririty |
ReplicationConfiguration | Yes |
Limit 1000 At least 1 rule is required in a configuration. |
A replication rule. Determines which objects are replicated and how. |
| ID | String | Rule | No |
Must consist of alphanumeric characters and symbols: ID specified in each rule must be unique within a configuration. |
A unique identifier for the containing rule. If not specified, a random UUID will be generated for the rule. |
|
| Destination | Container | Bucket | Rule | Yes | Limit 1 | |
| Bucket | String | Destination | Yes |
Must be between 1 and 255 characters long. Must consist of alphanumeric characters and symbols: |
Name of the destination bucket where objects will be replicated to. | |
| Priority | Integer | Rule | Yes | Must be between 0 and 2147483647 | A priority is associated with each rule. There may be cases where multiple rules are applicable to an object that is uploaded. In these situations, the applicable rule with the highest priority will apply. Thus only a single replication rule can be applied to any object, irrespective of how many rules in the replication policy may be a match for the object. Note that the higher the number, the higher the priority. | |
| Status | String |
Rule DeleteMarkerReplication |
Yes | Valid values: Enabled, Disabled |
Specifies state of the parent container. | |
| DeleteMarkerReplication | Container | Status | Rule | Yes | Limit 1 | Specifies whether delete markers should be replicated. |
| Filter | String |
And |
Rule | Yes |
Can be empty (e.g. or specify exactly one child element from: |
A filter that identifies which objects this replication rule applies to. See "Valid filter examples" below. |
| Prefix | String |
Filter And |
No | An object key name prefix that identifies the subset of objects to which the rule applies. | Specifies the prefix to be matched against the object name. | |
| Tag | Container |
|
No |
Must contain If If multiple tags are specified using |
A container for specifying a tag key and value. The rule applies only to objects that have the specified tag in their tag set. | |
| And | Container |
|
Filter | No |
Must contain at least 1 child element (Prefix or Tag). No more than 1 Prefix. Up to 10 Tag's allowed. |
Used to combine filter conditions. All inner conditions are AND'ed; object must meet ALL of conditions for the containing rule to apply. See "Valid filter examples" below for usage. |
| Key | String | Tag | Yes | Cannot be empty. Up to 128 UTF-16 characters (256 total bytes) | Specifies the tag key. | |
| Value | String | Tag | Yes | Can be empty. Up to 256 UTF-16 characters (512 total bytes) | Specifies the tag value. |
Request integrity
An integrity check is required for this API. This can be done by providing one of these headers:
Content-MD5x-amz-checksum-crc32x-amz-checksum-crc32cx-amz-checksum-crc64nvmex-amz-checksum-sha1x-amz-checksum-sha256
For example, the Content-MD5 header needs to be the binary representation of a base64-encoded MD5 hash. The following snippet shows one way to achieve the content for that particular header:
echo -n <XML block> | openssl dgst -md5 -binary | openssl enc -base64
Sample request
PUT /source-bucket?replication HTTP/1.1
Host: {hostname}
Accept: */*
Date: Fri, 12 Dec 2025 07:06:43 GMT
Connection: close
Content-MD5: tYropt4VgCXswcgOAM8rKg==
Content-Length: 440
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ID>SimpleReplication</ID>
<Priority>1</Priority>
<Status>Enabled</Status>
<DeleteMarkerReplication>
<Status>Disabled</Status>
</DeleteMarkerReplication>
<Filter/>
<Destination>
<Bucket>target-bucket</Bucket>
</Destination>
</Rule>
</ReplicationConfiguration>
Sample response
HTTP/1.1 200 OK
Connection: close
Date: Fri, 12 Dec 2025 07:06:43 GMT
X-Clv-Request-Id: 3d4dd397-0097-42ad-b102-78fb4b8508d2
X-Clv-S3-Version: 2.5
Content-Length: 0
Server: Cleversafe/3.14.9.53
Valid filter examples
| Filter | Description |
|---|---|
|
no filter, applies to all objects in this bucket |
|
match by name prefix abc/ |
|
match by object tag |
|
match objects with ALL of the following: prefix tag
tag |