The steps to enable cross-region replication from the CLI can be summarized as follows:
- Create a role that can be assumed by S3, with a permissions policy with the s3:Get* and s3:ListBucket actions for the source bucket and objects, and the s3:ReplicateObject, s3:ReplicateDelete, s3:ReplicateTags, and s3:GetObjectVersionTagging actions for the destination bucket objects.
- Create (or update) a replication configuration for the bucket using the aws s3api put-bucket-replication command providing a replication configuration JSON.
Complete CLI commands and policy JSON files are available with the code files.
Let's quickly go through some more details related to S3 cross-region replication:
- Cross-region replication is done via ...