Connect Amazon S3 bucket

You need to connect to at least one of the available cloud storage providers to get your workspace backed up.

To let Notion Backups connect to your S3 bucket, attach the AmazonS3FullAccess policy to your IAM user. It's better to create a new user with only this policy attached to keep your AWS account secure.

To create a new IAM user from your AWS Dashboard:

  1. Visit the Users page in your IAM dashboard
  2. Come up with a user name and select the "Access key" option as a credential type Creating a new user in the AWS IAM
  3. Select the "Attach existing policies directly" tab and search for the "AmazonS3FullAccess" policyAttaching a policy to the IAM user
  4. After creating a user, you can use the newly-generated Access Key ID and Secret Access Key in Notion Backups Final screen summarizing IAM user's attributes

Keep in mind that this newly-created IAM user will have access to all your S3 buckets. To restrict access to a specific bucket only, you can use the IAM policy below.

IAM policy

If you're creating an IAM user programmatically, you can use the following policy (replace yourbucket with your bucket's name):


{
    "Version": "2012-10-17",
    "Statement": [{
        "Sid": "GrantFullAccessToThisS3Bucket",
        "Effect": "Allow",
        "Action": ["s3:*"],
        "Resource": [
            "arn:aws:s3:::yourbucket",
            "arn:aws:s3:::yourbucket/*"
        ]
    }]
}

Terraform

If you're using Terraform to control your AWS infrastructure, you can use the following script to create an IAM policy:


resource "aws_iam_policy" "notion_backups" {
  name = "notion_backups"
  description = "Create an IAM policy to control the S3 bucket."

  policy = jsonencode({
    Version = "2012-10-17"
    Statement = [{
      Sid = "GrantFullAccessToThisS3Bucket"
      Effect = "Allow"
      Action = ["s3:*"]
      Resource = [
        aws_s3_bucket.notion_backups.arn,
        "${aws_s3_bucket.notion_backups.arn}/*"
      ]
    }]
  })
}

If you have questions about anything, feel free to reach out.