Cross-Account, Cross-Region Replication Using OBS
Scenarios
Cross-region replication across accounts is to replicate data from a source bucket in one region of an account to a destination bucket in a different region of another account.
- Replicating data from bucket A in region A under account A to bucket B in region B under account B

- Replicating data uploaded by account B from bucket A in region A under account A to bucket B in region B under account A

This section describes how to replicate data between buckets across different accounts and regions using OBS Console, OBS APIs, or obsutil.
Replication scope: files/folders, object lists, objects matching a specified prefix, and objects modified after a specified time
Replication content: object content, metadata (object name, size, last modification time, creator, version ID, and user-defined metadata), ACL, and storage class
You can use cross-region replication across accounts to meet the following requirements:
- Compliance requirements
OBS stores data across geographically distant AZs by default, but some compliance standards may require even greater separation. In such cases, you can use cross-region replication to meet compliance requirements.
- Low latency
The same OBS resources may need to be accessed from different locations. To minimize the access latency, you can use cross-region replication to create object copies in the nearest region.
- Data replication
You want to migrate data stored in OBS to the data center in another region.
- Data backup and disaster recovery
For security and availability purposes, you want to create explicit backups for all data written to OBS in the data center of another region to ensure data remains available if there is any damage.
- Easy maintenance
If you have compute clusters in two different OBS regions that need to analyze the same set of objects, you can maintain object replicas in both regions.
OBS helps you replicate your service data stored in OBS to a specified region. However, Huawei Cloud does not have visibility into your data and is not responsible for ensuring the legal compliance of your use of OBS. If your replication involves cross-border transfer, ensure that your use complies with relevant laws and regulations.
Constraints
| Category | Description |
|---|---|
| Bucket version | Only buckets with version 3.0 or later support cross-region replication. You can view the version of a bucket in the Basic Information area on the bucket's Overview page of OBS Console. For details, see Viewing Bucket Information. |
| Functions |
|
| Time | Cross-region replication is not real-time. After you configure a replication rule, objects may not be replicated immediately. Please wait patiently. |
| Regions |
|
| Synchronization of existing objects |
|
| Versioning |
|
| Access control |
|
| Tags | A cross-region replication rule does not replicate tags applied to the source bucket and objects to the destination bucket. |
| Others |
|
Billing for Cross-Region Replication Across Accounts
- When you use OBS Console, APIs, or obsutil to replicate data across regions, you will be billed for requests, traffic, and storage. For details, see Table 2.
Table 2 Billing for cross-region replication Action
Billing Item
Description
Billing Mode
Replicate data across regions
Requests
You are billed for the number of successfully replicated objects. Successfully replicating one object creates a copy request. For details, see Copying Objects.
- For non-multipart objects, replicating an object creates a GET request to the source bucket and a PUT request to the destination bucket; deleting an object from the source bucket creates a DELETE request to the destination bucket.
- For multipart objects, replicating each part creates a GET request to the source bucket and a PUT request to the destination bucket.
- Modifying a replicated source object's ACL automatically synchronizes the change to the destination object. NOTE:
Because the source bucket initiates this ACL replication, it incurs the resulting PUT request charges.
For details about request billing, see Requests.
Pay-per-use
Data transfer
Traffic generated when you replicate data from the source bucket to the destination bucket in another region. Billing only applies to the data transferred out of the source bucket.
If objects are encrypted using server-side encryption, the cost of their cross-region replication traffic is calculated based on the length of the plaintext for SSE-KMS and SSE-OBS.
NOTE:Cross-account, cross-region replication does not support SSE-KMS-encrypted objects.
Pay-per-use
Storage space
Space occupied by the replicated objects in the destination bucket
If you have specified another storage class for object copies in the destination bucket, these copies are billed based on the new storage class.
If objects are encrypted using server-side encryption, their storage cost is calculated based on the length of the ciphertext.
Pay-per-use
Resource packages
Synchronize existing objects
Requests
You are billed for the number of existing objects that are successfully replicated to the destination bucket.
Billing applies to the number of objects that are successfully replicated. You are also billed for listing the existing objects.
Pay-per-use
Data transfer
Traffic generated when OBS replicates existing objects to the destination bucket in another region. Billing only applies to the data transferred out of the source bucket.
If historical objects are encrypted using server-side encryption, the cost of their cross-region replication traffic is calculated based on the length of the plaintext for SSE-KMS and SSE-OBS.
Pay-per-use
Storage space
Space occupied by the replicated objects in the destination bucket
If you have specified another storage class for object copies in the destination bucket, these copies are billed based on the new storage class.
If historical objects are encrypted using server-side encryption, their storage cost is calculated based on the length of the ciphertext.
Pay-per-use
Resource packages
Prerequisites
- There is a source bucket in a region of an account.
- There is a destination bucket in a different region of another account. To create a bucket, see Creating a Bucket.
- When you use OBS Console, APIs, or obsutil to replicate objects across accounts and regions, the source bucket must be version 3.0 or later, and its region must support cross-region, cross-account replication.
- To replicate objects from the source bucket to the destination bucket, first configure a bucket policy on the destination bucket to grant the source bucket owner all permissions except DeleteBucket, PutBucketPolicy, and PutBucketAcl. For details about permission configuration, see Creating a Custom Bucket Policy (Visual Editor).
- If the source bucket contains objects uploaded by users other than the source bucket owner, you must configure the bucket ACL on the source bucket to grant the source bucket owner the FULL_CONTROL permission and specify the object read permission (set Delivered to true in the API). Only then can objects uploaded by other accounts be replicated to the destination bucket. To achieve this, you can edit the ACL of the source bucket owner.

- If you want to replicate the ACL of the source object to the destination bucket when replicating the source object content, you must first configure the bucket ACL on the destination bucket to grant the source bucket owner the FULL_CONTROL permission and specify the object read permission (set Delivered to true in the API).

For details about how to configure a bucket ACL, see Configuring a Bucket ACL. For details about the FULL_CONTROL permission, see Customizing an ACL.
Procedure
Step 2: Configure Cross-Account, Cross-Region Replication
You can use OBS Console, APIs, or obsutil to configure cross-account, cross-region replication. You cannot use SDKs or OBS Browser+ to do so.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot

