Using S3 Replication metrics - Amazon Simple Storage Service

Using S3 Replication metrics

S3 Replication metrics provide detailed metrics for the replication rules in your replication configuration. With replication metrics, you can monitor minute-by-minute progress by tracking bytes pending, operations pending, operations that failed replication, and replication latency.

Note
  • S3 Replication metrics are billed at the same rate as Amazon CloudWatch custom metrics. For more information, see Amazon CloudWatch pricing.

  • If you're using S3 Replication Time Control, Amazon CloudWatch begins reporting replication metrics 15 minutes after you enable S3 RTC on the respective replication rule.

S3 Replication metrics are turned on automatically when you enable S3 Replication Time Control (S3 RTC). You can also enable S3 Replication metrics independently of S3 RTC while creating or editing a rule. S3 RTC includes other features, such as a service level agreement (SLA) and notifications for missed thresholds. For more information, see Meeting compliance requirements using S3 Replication Time Control (S3 RTC).

When S3 Replication metrics are enabled, Amazon S3 publishes the following metrics to Amazon CloudWatch. CloudWatch metrics are delivered on a best-effort basis.

Metric name Metric description Which objects does this metric apply to? Which Region is this metric published in? Is this metric still published if the destination bucket is deleted? Is this metric still published if replication doesn't occur?
Bytes Pending Replication

The total number of bytes of objects that are pending replication for a given replication rule.

This metric applies only to new objects that are replicated with S3 Cross-Region Replication (S3 CRR) or S3 Same-Region Replication (S3 SRR). This metric is published in the Region of the destination bucket. No Yes
Replication Latency

The maximum number of seconds by which the replication destination bucket is behind the source bucket for a given replication rule.

This metric applies only to new objects that are replicated with S3 CRR or S3 SRR. This metric is published in the Region of the destination bucket. No Yes
Operations Pending Replication

The number of operations that are pending replication for a given replication rule. This metric tracks operations related to objects, delete markers, tags, access control lists (ACLs), and S3 Object Lock.

This metric applies only to new objects that are replicated with S3 CRR or S3 SRR. This metric is published in the Region of the destination bucket. No Yes
Operations Failed Replication

The number of operations that failed replication for a given replication rule. This metric tracks operations related to objects, delete markers, tags, access control lists (ACLs), and Object Lock.

Operations Failed Replication tracks S3 Replication failures aggregated at a per-minute interval. To identify the specific objects that have failed replication and their failure reasons, subscribe to the OperationFailedReplication event in Amazon S3 Event Notifications. For more information, see Receiving replication failure events with Amazon S3 Event Notifications.

This metric applies both to new objects that are replicated with S3 CRR or S3 SRR and also to existing objects that are replicated with S3 Batch Replication.

Note

If an S3 Batch Replication job fails to run at all, metrics aren't sent to Amazon CloudWatch. For example, your job won't run if you don't have the necessary permissions to run an S3 Batch Replication job, or if the tags or prefix in your replication configuration don't match.

This metric is published in the Region of the source bucket. Yes No

For information about working with these metrics in CloudWatch, see S3 Replication metrics in CloudWatch.

Enabling S3 Replication metrics

You can start using S3 Replication metrics with a new or existing replication rule. For full instructions on creating replication rules, see Configuring replication for source and destination buckets owned by the same account. You can choose to apply your replication rule to an entire S3 bucket, or to Amazon S3 objects with a specific prefix or tag.

This topic provides instructions for enabling S3 Replication metrics in your replication configuration when the source and destination buckets are owned by the same or different AWS accounts.

To enable replication metrics by using the AWS Command Line Interface (AWS CLI), you must add a replication configuration to the source bucket with Metrics enabled. In this example configuration, objects under the prefix Tax are replicated to the destination bucket amzn-s3-demo-bucket, and metrics are generated for those objects.

{ "Rules": [ { "Status": "Enabled", "Filter": { "Prefix": "Tax" }, "Destination": { "Bucket": "arn:aws:s3:::amzn-s3-demo-bucket", "Metrics": { "Status": "Enabled" } }, "Priority": 1 } ], "Role": "IAM-Role-ARN" }

Viewing replication metrics

You can view S3 Replication metrics in the source bucket's Metrics tab in the Amazon S3 console. These Amazon CloudWatch metrics are also available in the Amazon CloudWatch console. When you enable S3 Replication metrics, Amazon CloudWatch emits metrics that you can use to track bytes pending, operations pending, and replication latency at the replication rule level.

S3 Replication metrics are turned on automatically when you enable replication with S3 Replication Time Control (S3 RTC) by using the Amazon S3 console or the Amazon S3 REST API. You can also enable S3 Replication metrics independently of S3 RTC while creating or editing a rule.

If you're using S3 Replication Time Control, Amazon CloudWatch begins reporting replication metrics 15 minutes after you enable S3 RTC on the respective replication rule. For more information, see Replication metrics with S3 RTC.

Replication metrics track the rule IDs of the replication configuration. A replication rule ID can be specific to a prefix, a tag, or a combination of both.

For more information about CloudWatch metrics for Amazon S3, see Monitoring metrics with Amazon CloudWatch.

Prerequisites

Create a replication rule that has S3 Replication metrics enabled. For more information, see Enabling S3 Replication metrics.

To view S3 Replication metrics through the source bucket's Metrics tab
  1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.

  2. In the left navigation pane, choose Buckets.

  3. In the General purpose buckets list, choose the name of the source bucket that contains the objects that you want replication metrics for.

  4. Choose the Metrics tab.

  5. Under Replication metrics, choose the replication rules that you want to see metrics for.

  6. Choose Display charts.

    Amazon S3 displays Replication latency, Bytes pending replication, Operations pending replication, and Operations failed replication charts for the rules that you selected.