Now let's talk about S3 Replication.
And SSCRR and SRR
because it means cross region replication
and same region replication.
And I will explain to you this in a second.
So you have an S3 bucket
and say that bucket is an EU west one,
and you want to replicate all the bucket content
continuously into another region US east one.
And you would do so, for example,
because you want to save data
in another region in case a disaster hits EUS one.
So you want asynchronous replication to happen
behind the scenes.
For this, you must enable versioning
in source and destination buckets.
And then you have either cross region replication.
That means that you go from different regions.
In this example, EU west one to US east one,
and then same region replication
SRR to go from the same regions.
So from EU US one to EUS one.
The buckets can also be in different AWS accounts
and the copying is asynchronous,
so it will happen behind the scenes.
You must give proper IM permissions to S3 of course,
to do the replication.
And so the use cases of CRR are to do compliance,
lower latency access, or replication across accounts.
And SRR are going to be more around log aggregation
across multiple accounts,
live replication between production and test accounts,
or disaster recovery.
Now, some notes about S3 replication.
When you enable S3 replication,
only the new objects in your bucket are going to be
replicated from then on.
But if you want to replicate your existing objects,
you have a feature called S3 batch replication,
and it will replicate the existing objects,
as well as any object that have failed
the S3 replication mechanism.
If you have a delete operation in your S3 buckets,
then you can replicate the delete markers
from source to the target bucket.
And this is an optional setting.
And if you have a deletion for a specific version ID,
they're not replicated to avoid malicious deletes
and for someone to delete data permanently in your buckets.
And finally, there is no chaining of replication.
So if bucket one has replication into bucket two,
and bucket two has replication into bucket three,
then the objects of bucket one are not going to be
replicated to bucket three.
Okay, that's it for S3 replication.
I hope you liked it,
and I will see you in the next lecture.