Advanced: Configure AWS S3 backup
This document contains instructions to configure AWS S3 bucket backup
Configure with terraform AWS deployment
To configure AWS S3 bucket backup use instructions
Manual S3 bucket backup configuration
To configure manual AWS S3 bucket backup do the next steps:
- Login to your AWS Console and navigate to the S3 service
- Choose the S3 bucket that you use for datagrok
- Go to
Properties --> Bucket Versioning
and pressEdit
- Set Bucket Versioning
Enable
and pressSave changes
- Go to IAM, press
Roles
and pressCreate new role
. - Choose
AWS Service
, inUse cases for other AWS services:
chooseAWS Backup
and pressnext
- In step two choose the correct permissions:
-
Search and add
AWSBackupServiceRolePolicyForS3Backup
policy -
Press
Create policy
, chooseJSON
, insert the following code, and pressnext
{
"Statement": [
{
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation",
"s3:GetObjectVersion",
"s3:GetObjectVersionAcl",
"s3:GetObject",
"s3:ListBucketMultipartUploads",
"s3:*",
"backup:CreateBackupPlan",
"backup:CreateBackupSelection",
"backup:StartBackupJob",
"backup:ListBackupPlans",
"backup:ListBackupSelections",
"backup:ListBackupVaults",
"cloudwatch:GetMetricData"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::<Your S3 bucket name>",
"arn:aws:s3:::<Your S3 bucket name>/*",
"*"
]
}
],
"Version": "2012-10-17"
} -
Set tag and policy name and save it
-
Add saved policy to IAM Role
-
Set IAM Role name and create it
-
- Go to
AWS Backup --> Backup vaults
, presscreate backup vault
- Choose Vault name and kms key and press
create backup vault
- Go to
AWS Backup --> Backup vaults
, presscreate backup plan
- Choose
Start with a template
, select a template, and write backup plan name - Press
Add backup rule
, set backup rule name, choose your backup vault, set backup frequencyDaily
and retention periodDays 7
, pressAdd backup rule
- Press
Create backup plan
- Set
Resource assignment name
, choose your IAM role that was created earlier - Next you can include all resource types in
Define resource selection
, but we recommend to use include specific resource types, chooseS3
, choose your S3 bucket that you use for Datagrok and pressAssign resources
Now your S3 bucket backup is enabled.