Setting AWS S3 object storage as snapshot repository for CrateDB

  1. Sign up for an AWS account: Prerequisite: Setting up Amazon S3 - Amazon Simple Storage Service

  2. Create an S3 bucket: Step 1: Create your first S3 bucket - Amazon Simple Storage Service

  3. For configuring the repository, you will need a long-term access key ID and secret access key: AWS security credentials - AWS Identity and Access Management

    aws_access_key_id = AKIAIOSFODNN7EXAMPLE 
    aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
  4. In your CrateDB Cluster, create a new repository

    • You will need:

      • Access key
      • Secret access key
      • Bucket name
    • Create the repository:

    TYPE s3
    WITH (
          access_key = 'AKIAIOSFODNN7EXAMPLE',
          secret_key = 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
          bucket ='cratebackup'
  5. Create your first snapshot

    CREATE SNAPSHOT awsrepo.first_snapshot TABLE my_table;

For the full configuration options see CREATE REPOSITORY — CrateDB: Reference
For more information on snapshots and repositories see Snapshots — CrateDB: Reference