DEV Community

Asanka Boteju
Asanka Boteju

Posted on

AWS Cross-Region S3 Bucket Replication

Image description

👋 Cross-Region Replication

AWS S3 Cross-Region replication enables you to sync your files from a source S3 Bucket to a destination S3 Bucket, You can make use of this feature for your Business's compliance needs or to reduce the latency for users who connect from other regions to access content from your applications.

Let's walk through the steps to set up S3-Cross Region replication now

  • Log into your AWS Console and navigate to the S3 Bucket section.

  • Create two S3 Buckets, One as your source S3 Bucket and the other one as your destination S3 Bucket as shown below.

Image description

Next, make sure to enable versioning as a precaution to prevent any files from getting overwritten In case you upload the same content mistakenly again.

Image description

  • As shown below, Give a name for the Replication Rule.

  • Then, in the Rule Scope section choose Apply to all the objects in the Bucket. This will make sure all objects you upload to the destination bucket will get replicated to the destination bucket.

  • Now, choose the destination S3 Bucket where you would want your content to be replicated.

Image description

Image description

Image description

Then in the IAM role section, allow the console to create an IAM role for you. Alternatively, if you already have an existing IAM role with the required permissions then you can pick that too.

Image description

We are done with the setup now and it's time to test to make sure the contents are getting replicated to the destination.

  • Go to your source S3 Bucket and upload a file.

  • Then open the destination S3 Bucket to see the replicated content. (see the image below)

Image description

🙌 Good Job! You have finally implemented the S3 Cross-Region Replication.

Top comments (0)