Chris Hansen
Chris Hansen

Reputation: 8639

backing up s3 buckets best practice

I want to do a daily backup for s3 buckets. I was wondering if anyone knew what was best practice?

I was thinking of using a lambda function to copy contents from one s3 bucket to another as the s3 bucket is updated. But that won't mitigate against an s3 failure. How do I copy contents from one s3 bucket to another Amazon service like Glacier using lamda? What's the best practice here for backing up s3 buckets?

NOTE: I want to do a backup not archive (where content is deleted afterward)

Upvotes: 0

Views: 298

Answers (1)

Mark B
Mark B

Reputation: 200446

Look into S3 cross-region replication to keep a backup copy of everything in another S3 bucket in another region. Note that you can even have the destination bucket be in a different AWS Account, so that it is safe even if your primary S3 account is hacked.

Note that a combination of Cross Region Replication and S3 Object Versioning (which is required for replication) will allow you to keep old versions of your files available even if they are deleted from the source bucket.

Then look into S3 lifecycle management to transition objects to Glacier to save storage costs.

Upvotes: 1

Related Questions