Skip to main content

06. Amazon S3 Replication

Amazon S3 Replication allows you to automatically copy objects between buckets either within the same AWS Region or across different Regions.

There are two replication types:

TypeNameDescription
CRRCross-Region ReplicationReplicates objects between buckets in different AWS Regions
SRRSame-Region ReplicationReplicates objects between buckets in the same Region

Replication is asynchronous and requires versioning enabled on both source and destination buckets.


🧩 Prerequisites

RequirementDescription
✅ VersioningMust be enabled on both source and destination buckets
✅ PermissionsIAM role must allow S3 to read from source and write to destination
✅ Destination bucketCan be in same or different AWS account

⚙️ Use Cases

Replication TypeCommon Use Cases
CRR🔹 Compliance or data sovereignty🔹 Disaster recovery🔹 Lower latency for global users🔹 Cross-account replication
SRR🔹 Log aggregation🔹 Dev/Test environment sync🔹 Backup within same Region

🧭 Create Replication Setup (Step-by-Step)

1️⃣ Create Source Bucket

  1. Go to Amazon S3 Console → click Create bucket
  2. Name: s3-himanshupapola-origin-v1
  3. Choose region → e.g. ap-south-2
  4. Enable Versioning

2️⃣ Create Destination Bucket

  1. Create another bucket: s3-stephane-bucket-replica-v2
  2. Choose region →
    • Same region → SRR
    • Different region (e.g. us-east-1) → CRR
  3. Enable Versioning
IAM Roles Example

3️⃣ Configure Replication Rule

  1. Go to Source Bucket → Management → Replication rules → Create rule
  2. Rule name: demo-replication-rule
  3. Apply to: All objects
  4. Destination bucket: Choose your replica bucket
  5. Region auto-detected
  6. IAM Role: Create new role (S3 handles permissions)
  7. Choose whether to replicate existing objects (optional)
IAM Roles Example

🧩 Testing Replication

ActionResult
Upload coffee.jpeg to source bucketFile automatically replicates to destination bucket
Check object versionsVersion IDs are identical in both buckets
IAM Roles Example
IAM Roles Example

⚡ Notes & Limitations

  • Replication works only from the time rule is created — previous objects not copied automatically.
    → Use S3 Batch Operations for existing objects.
  • Replication is one-way (source → destination).
  • Objects encrypted with SSE-KMS need additional permissions.
  • You can chain replication rules for multiple destinations.

✅ Summary

FeatureDescription
Replication TypeCRR (cross-region) / SRR (same-region)
Replication DirectionOne-way, asynchronous
Requires VersioningYes
Cross-Account SupportYes
Supports Existing ObjectsOnly via batch replication
IAM Permissions NeededS3 read/write access for replication role