Certopolis

AWS Certified DevOps Engineer – Professional

S3 replication: requirements, RTC and Batch Replication

S3 replication needs versioning on both the source and destination buckets and permission for Amazon S3 to replicate on your behalf. The Amazon S3 User Guide says live replication copies only objects created after the configuration exists. S3 Replication Time Control replicates 99.9 percent of objects within 15 minutes, and S3 Batch Replication copies existing objects on demand.

What does S3 replication require?

Both the source and destination buckets must have versioning enabled. Amazon S3 needs permission to replicate objects on your behalf. If the source bucket has S3 Object Lock enabled, the destination must have it too. Across accounts, the destination bucket owner must grant the source bucket owner permission with a bucket policy. A destination bucket cannot be a Requester Pays bucket.

By default S3 replicates objects created after you add the replication configuration, along with their metadata. With the current configuration version, which uses the Filter element, delete markers are not replicated unless you turn on delete marker replication. Deleting a specific object version in the source is never replicated to the destination.

What does S3 Replication Time Control guarantee?

S3 RTC replicates most objects in seconds and 99.9 percent of them within 15 minutes. Rules with S3 RTC publish S3 Replication metrics, such as operations and bytes pending replication. It also provides the OperationMissedThreshold and OperationReplicatedAfterThreshold events, delivered through S3 Event Notifications to Amazon SQS, Amazon SNS or AWS Lambda, for objects that miss the 15-minute threshold or replicate after it.

The S3 RTC service level agreement does not apply while the replication data transfer rate is above the default quota of 1 Gbps. You can request a higher quota through Service Quotas or AWS Support. The SLA also does not apply while the S3 request rate guidelines are exceeded.

When do you need S3 Batch Replication?

Live replication skips three kinds of object: objects that existed before the configuration, objects that were already replicated to a different destination, and objects that are themselves replicas made by another rule. If you change the destination bucket in a rule, S3 does not replicate the earlier objects again. S3 Batch Replication handles these cases, and objects that failed replication, as an on-demand Batch Operations job.

The source bucket must already have a replication configuration. The job needs a manifest, which S3 can generate. The ObjectReplicationStatuses filter selects objects by status: NONE for never replicated, FAILED, COMPLETED for replicated before, and REPLICA.

Batch Replication is not supported for objects in S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive. AWS recommends disabling lifecycle rules while a job runs.

Where the exam catches people

  • Believing versioning is needed only on the source bucket: both buckets must have versioning enabled.
  • Believing a new replication rule copies objects already in the bucket: live replication covers objects created after the configuration. Use Batch Replication for the rest.
  • Believing a changed destination gets the old objects: objects already replicated elsewhere are not replicated again. Run Batch Replication with the COMPLETED status included.
  • Believing the S3 RTC 15-minute commitment holds at any transfer rate: the SLA does not apply above the default 1 Gbps quota.
  • Believing a replica is replicated onward by another rule: replicas are not replicated by default.

Written from these sources

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. A media company renders video files overnight and writes them to an Amazon S3 bucket in us-east-1 that uses the default SSE-S3 encryption. A live replication rule copies each file to a bucket in us-west-2. The files are large: a few hundred are written each night, and replication traffic peaks at about 4 Gbps. A new contract requires a commitment backed by AWS that 99.9 percent of the files reach us-west-2 within 15 minutes, and the company must be told about any file that misses that window. Which combination of steps will meet these requirements? (Select TWO.)

    Right. In the game that’s Renown for your Resilient Cloud Solutions building.

    Not that one: A,E is right. In the game your Resilient Cloud Solutions building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Its service level agreement does not apply while replication data transfer is above the default 1 Gbps quota, and this workload peaks at about 4 Gbps, so the company also raises the replication transfer rate quota through Service Quotas. The request rate exclusion is real but does not bind a few hundred files a night.

    Written from docs.aws.amazon.com/AmazonS3/latest/userguide/replication-time-control.html

  2. A company has replicated a document bucket in us-east-1 to a bucket in us-west-2 with a live replication rule for two years, and replication metrics showed no failed or pending operations. Through the company's infrastructure as code pipeline, the DevOps team changes the rule's destination to a new bucket in us-east-2 and plans to retire the us-west-2 bucket. New uploads now appear in us-east-2, but none of the objects uploaded before the change do. Every object version in the source bucket must exist in the us-east-2 bucket. What should a DevOps engineer do to meet these requirements?

    Right. In the game that’s Renown for your Resilient Cloud Solutions building.

    Not that one: B is right. In the game your Resilient Cloud Solutions building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    S3 Batch Replication backfills them on demand, and the filter has to match their status: these objects were replicated successfully to us-west-2, so their status is COMPLETED, and including COMPLETED is how a Batch Replication job backfills a destination with objects already replicated elsewhere. The metrics showed no failures, so nothing else needs selecting.

    Written from docs.aws.amazon.com/AmazonS3/latest/userguide/s3-batch-replication-batch.html

  3. A company keeps release artifacts in an Amazon S3 bucket in us-east-1. For disaster recovery, a DevOps engineer adds an S3 Cross-Region Replication rule to the bucket's AWS CloudFormation template, with a new bucket in us-west-2 as the destination and an IAM role that Amazon S3 can assume to replicate objects. The stack update fails because a bucket feature that replication depends on is turned off. The replication rule must deploy successfully. What should a DevOps engineer do to meet these requirements?

    Right. In the game that’s Renown for your Resilient Cloud Solutions building.

    Not that one: A is right. In the game your Resilient Cloud Solutions building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Turning versioning on for both buckets in the template lets the replication rule deploy.

    Written from docs.aws.amazon.com/AmazonS3/latest/userguide/replication-requirements.html

Ask for something