Use this runbook to move S3 reads and writes to another Region through a Multi-Region Access Point (MRAP), or to fix clients that fail when they use one.
Keep one thing in mind: an MRAP routes requests and knows nothing about your data. It doesn't check whether the object has arrived in the target bucket. A failover with a replication gap returns 404s and stale reads with no error on the MRAP.
Know the control points
| Operation | Where to send it |
|---|---|
| Create, delete, describe, policy changes | us-west-2 only |
| Get or change routes (failover) | us-east-1, us-west-2, ap-southeast-2, ap-northeast-1 or eu-west-1 |
| Object requests | The global MRAP endpoint |
export ACCOUNT=111122223333
export MRAP_ARN=arn:aws:s3::111122223333:accesspoint/mfzwi23gnjvgw.mrap
export CTRL=us-east-1 # don't use the Region that is failing
The ARN uses the generated alias with the .mrap suffix, not the name you chose. Find it with:
aws s3control list-multi-region-access-points --account-id $ACCOUNT --region us-west-2 \
--query 'AccessPoints[].{name:Name,alias:Alias,status:Status,regions:Regions[].{r:Region,b:Bucket}}'
Save the ARN, bucket names and these commands outside AWS. A management lookup needs us-west-2, which may be the Region you're leaving.
Pre-failover checks
1. Current routing
aws s3control get-multi-region-access-point-routes \
--region $CTRL --account-id $ACCOUNT --mrap $MRAP_ARN
TrafficDialPercentage is 100 for active or 0 for passive. It isn't a weighted split. Among active Regions, requests go to the closest one, so active-active doesn't give you an even share.
2. Replication gap
Replication metrics exist only when metrics or RTC are enabled on the rule. List the metrics in both Regions to see where yours are published:
for R in us-east-1 eu-west-1; do
aws cloudwatch list-metrics --region $R --namespace AWS/S3 \
--metric-name OperationsPendingReplication
done
aws cloudwatch get-metric-statistics --region <region-found> --namespace AWS/S3 \
--metric-name OperationsPendingReplication \
--dimensions Name=SourceBucket,Value=orders-use1 Name=DestinationBucket,Value=orders-euw1 Name=RuleId,Value=<rule-id> \
--start-time "$(date -u -d '1 hour ago' +%FT%TZ)" --end-time "$(date -u +%FT%TZ)" \
--period 60 --statistics Maximum
Check BytesPendingReplication, ReplicationLatency and OperationsFailedReplication too. Failed operations don't drain on their own, so a pending count of zero isn't proof that the buckets match.
Spot-check critical keys against the regional buckets directly:
aws s3api head-object --region us-east-1 --bucket orders-use1 --key manifests/latest.json \
--query '{status:ReplicationStatus,etag:ETag,modified:LastModified}'
aws s3api head-object --region eu-west-1 --bucket orders-euw1 --key manifests/latest.json \
--query '{status:ReplicationStatus,etag:ETag,modified:LastModified}'
3. Reverse replication
Confirm that rules exist in both directions. Without the return rule, every write after failover is stranded in the DR Region.
aws s3api get-bucket-replication --region eu-west-1 --bucket orders-euw1
Warning
The console template for MRAP replication overwrites the existing replication rules on the buckets. Export each bucket's configuration with
get-bucket-replicationfirst.
4. Destination readiness
- The callers' roles can use the KMS key in the target Region. Each bucket uses its own Region's key unless you set up multi-Region keys.
- Lifecycle, event notifications and bucket policies match. None of them follow the MRAP.
- Consumers of S3 events in the target Region are deployed and won't double-process replicas.
Fail over
Caution
In an unplanned failover, objects not yet replicated are unreachable through the MRAP until you recover them or fail back. If another writer then creates the same key in the new Region, the two buckets hold different versions. Pause writers for planned moves and record the failover time for reconciliation.
- Planned only: stop writers and wait until pending operations reach zero.
- Set the new Region active and the old one passive in a single call. At least one Region must stay active.
aws s3control submit-multi-region-access-point-routes \
--region $CTRL --account-id $ACCOUNT --mrap $MRAP_ARN \
--route-updates Bucket=orders-euw1,TrafficDialPercentage=100 \
Bucket=orders-use1,TrafficDialPercentage=0
- Read the routes back. Allow up to two minutes for the change to take effect.
- Wait for in-flight work. Operations already running against the old Region continue until they succeed or fail, so a large upload can still commit there after the switch.
- Prove it with a write, then look for it in the target bucket:
KEY=_failover/$(date -u +%Y%m%dT%H%M%SZ).txt
date -u > probe.txt
aws s3api put-object --bucket "$MRAP_ARN" --key "$KEY" --body probe.txt
aws s3api head-object --region eu-west-1 --bucket orders-euw1 --key "$KEY"
ReplicationStatus must be absent, PENDING or COMPLETED. If it's REPLICA, the write landed in the old Region and was copied across.
- Resume writers.
Multipart uploads across a failover
An upload ID belongs to the bucket where it was created. Parts routed to another bucket get NoSuchUpload. Make clients restart the whole upload on this error instead of retrying the part, and list orphans in the old bucket:
aws s3api list-multipart-uploads --region us-east-1 --bucket orders-use1
Fail back
- Check the old Region is healthy, and that the forward and reverse rules have drained.
- List what never replicated. S3 Inventory with the replication status field is the practical method at scale.
- Use S3 Batch Replication on the regional source bucket for failed or never-attempted objects. Batch Operations doesn't work through an MRAP.
- Reconcile keys written in both Regions. Compare version lists and choose the winner by business rule, not by
LastModifiedalone. - Submit the routes with the dials reversed.
Deletes need care. Delete markers replicate only if the rule enables it, and deletes of specific version IDs don't replicate. An object deleted during the outage can reappear after fail back.
Client errors through an MRAP
| Symptom | Cause | Fix |
|---|---|---|
| Missing CRT or SigV4A signing error | SDK lacks SigV4A support | pip install "boto3[crt]"; update the SDK |
| Auth fails only with temporary credentials | Token came from the global STS endpoint | Use regional STS endpoints |
| 404 for an object that exists in one Region | Routed to a bucket without the object | Fix replication; retry with backoff for new keys |
AccessDenied, while the regional bucket works | MRAP policy, bucket policy and IAM don't all allow | Grant on the MRAP ARN and the bucket |
| Timeout from a private subnet with a gateway endpoint | Gateway endpoints aren't supported | Interface endpoint for the global S3 access point service, or NAT |
CopyObject fails | MRAP was the copy source | Copy from the regional bucket; MRAP is destination only |
| CloudFront origin errors | Used as an S3 origin type | Configure it as a custom origin and sign with SigV4A |
| Listing varies between calls | Closest Region changed, or replication lag | Don't use MRAP listings as a source of truth |
import boto3
s3 = boto3.client("s3")
arn = "arn:aws:s3::111122223333:accesspoint/mfzwi23gnjvgw.mrap"
resp = s3.get_object(Bucket=arn, Key="manifests/latest.json")
print(resp["ETag"], resp["LastModified"])
For object permissions, the resource is the MRAP ARN followed by /object/ and the key pattern:
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3::111122223333:accesspoint/mfzwi23gnjvgw.mrap/object/*"
}
Prevent it next time
- Choose buckets carefully. They're fixed at creation, and changing the set means a new MRAP and a new alias in every client.
- Default to active-passive for data that is updated in place. Active-active suits immutable keys.
- Enable RTC, replica modification sync and delete marker replication where you need them, in both directions.
- Alarm on failed and pending replication, not only latency.
- Keep a CloudTrail trail that covers
us-west-2, and restricts3:SubmitMultiRegionAccessPointRoutesto the DR role. - Drill twice a year, with writes during the drill, and record the replication gap as your measured RPO.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get