Lesson 5 of 6 Amazon S3

Replicating S3 Objects Across Buckets and Regions

This lesson explains how S3 replication copies objects automatically and asynchronously to another bucket, in the same or another Region and account, for disaster recovery, compliance, latency and log aggregation.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish Cross-Region and Same-Region Replication.
  • Identify replication requirements and behaviour, including existing objects.
  • Describe Multi-Region Access Points.

Replication types

S3 replication copies objects automatically from one bucket to another, and requires versioning on both buckets. Cross-Region Replication (CRR) copies to a bucket in another Region, for disaster recovery, compliance rules that require a distant copy, or lower latency for users in another part of the world. Same-Region Replication (SRR) copies within a Region, for example to aggregate logs from many buckets, to keep a copy in another account, or to separate production and test data.

Replication applies only to objects written after it is set up. Batch Replication copies objects that already existed, or that failed to replicate. Replication Time Control (RTC) adds a guarantee that 99.99% of objects replicate within 15 minutes, with metrics and notifications for any that do not, for workloads with strict recovery point objectives. The following table summarises the types.

TypeUse for
Cross-Region Replication (CRR)Disaster recovery, compliance, lower latency for distant users
Same-Region Replication (SRR)Log aggregation, copies between accounts, separate production and test data
Batch ReplicationObjects that existed before replication was set up, or that failed to replicate
Replication Time Control (RTC)99.99% of objects replicated within 15 minutes, with metrics and notifications
Match the pairs

Replication options

Exam skills 1.3.5 · 2.2.5

Match each requirement with the S3 replication option that meets it.

Log in to try this activity Interactive activities are free with an account.

Requirements and behaviour

S3 Replication requires versioning on both the source and destination buckets, and an IAM role that S3 assumes to copy objects. It replicates new objects asynchronously, usually within minutes, and S3 Replication Time Control adds a guarantee for 99.99% of objects within 15 minutes. Objects that existed before replication was configured are copied with S3 Batch Replication.

Delete markers can optionally be replicated, but deletions of specific versions are never replicated, which protects the copy against malicious deletion in the source. Replicas can use a different storage class, such as Glacier for a disaster recovery copy, and can change ownership to the destination account. Objects encrypted with SSE-KMS need a destination key in the rule and key permissions for the replication role. Replication is not chained: objects replicated into a bucket are not replicated onward by that bucket's own rules.

The following diagram shows a replication rule to a bucket in another Region and account.

S3 Replication to a disaster recovery bucket. Both buckets have versioning, and S3 assumes an IAM role to copy new objects asynchronously, within 15 minutes for 99.99% of objects with Replication Time Control. Replicas can use another storage class and change ownership to the destination account. Delete markers are optionally replicated; deletions of specific versions never are.
The Regions are illustrative. Because version deletions are not replicated, the DR copy survives a malicious deletion in the source.
True or false

Replication behaviour

Exam skills 1.3.5

Check how S3 replication behaves.

Log in to try this activity Interactive activities are free with an account.

Multi-Region Access Points

S3 Multi-Region Access Points give one global endpoint for buckets in several Regions, routing requests to the nearest copy and failing over between Regions, combined with two-way replication.

Worked example

A DR copy in another account and Region

A disaster recovery copy of a bucket must be held in another account and Region. The following table identifies the replication setting that meets each requirement.

RequirementReplication setting
Copy to eu-central-1Cross-Region Replication rule
Copy owned by a separate backup accountDestination bucket in that account, with owner override
Lower storage cost for the copyReplica storage class Glacier Instant Retrieval
SSE-KMS objectsDestination KMS key in the rule, with permissions for the replication role
Copy existing objects tooS3 Batch Replication

Because deletions of specific versions are not replicated, a malicious delete in the source account cannot remove the copies.

Check yourself

What must be enabled on both buckets for S3 Replication?

Show answer

Versioning, on the source and the destination buckets.

Exam Tips

Remember for the exam

  • To copy objects to another Region automatically for disaster recovery, use CRR, which requires versioning.
  • To replicate objects that existed before replication was configured, use S3 Batch Replication.
  • For a cheaper disaster recovery copy, replicate into a colder storage class at the destination.
  • To replicate SSE-KMS objects, specify the destination KMS key and grant the replication role access to it.
  • For a predictable replication time with an SLA, use Replication Time Control.