Connect, and check each step.

Five checks, in order, with the AWS CLI. Each shows the command, what you should see, and what to do if you don’t.

Your values

Type them once and every command on this page fills in. Nothing you type here leaves this page. Never paste a key or secret here; those stay in your terminal.

  1. Your shell has the key

    Run this

    export AWS_ACCESS_KEY_ID=<access-key-id>
    export AWS_SECRET_ACCESS_KEY=<secret>
    export AWS_DEFAULT_REGION=us-east-1

    You should see

    Nothing. These lines print no output.

    If you don’t

    No key yet

    In the console, open Keys and create an application key scoped to clinic-backups.

    Open the console
  2. Your key can write

    Run this

    echo "hello world" > hello.txt
    aws --endpoint-url https://s3.amanahcloud.bh \
      s3 cp ./hello.txt s3://clinic-backups/

    You should see

    upload: ./hello.txt to s3://clinic-backups/hello.txt

    If you don’t

    SignatureDoesNotMatch

    The secret or the region is wrong. The region is us-east-1.

    A checksum error

    Run this line, then the command again.

    export AWS_REQUEST_CHECKSUM_CALCULATION=when_required
  3. The file is there

    Run this

    aws --endpoint-url https://s3.amanahcloud.bh \
      s3 ls s3://clinic-backups/

    You should see

    <date> <time>         12 hello.txt

    If you don’t

    AccessDenied

    The key is scoped to another bucket, or it cannot list. Check it under Keys.

  4. You can read it back

    Run this

    aws --endpoint-url https://s3.amanahcloud.bh \
      s3 cp s3://clinic-backups/hello.txt ./back.txt

    You should see

    download: s3://clinic-backups/hello.txt to ./back.txt

    If you don’t

    A checksum warning

    Run this line, then the command again.

    export AWS_RESPONSE_CHECKSUM_VALIDATION=when_required
  5. The first real backup

    Run this

    aws --endpoint-url https://s3.amanahcloud.bh \
      s3 sync /srv/backups \
      s3://clinic-backups/backups/

    You should see

    One upload: line for each file, then your prompt again.

    If you don’t

    It stops part-way

    Run the same command again. sync sends only what is missing.

The values every client asks for

The region is a label S3 tools expect, not a place. Your data is stored in Bahrain.

Endpoint
https://s3.amanahcloud.bh
Region
us-east-1
Signing
AWS Signature V4
Addressing
Path-style or virtual-hosted
Keys
One per bucket, from Keys in the console

Settings for other tools

The checks use the AWS CLI. rclone and restic take the same values, filled in here with your bucket and folder.

rclone

Add this to rclone’s config file, ~/.config/rclone/rclone.conf.

[amanah]
type = s3
provider = Other
access_key_id = <access-key-id>
secret_access_key = <secret>
endpoint = https://s3.amanahcloud.bh
region = us-east-1

Then run the first sync.

rclone sync /srv/backups amanah:clinic-backups/backups

restic

Uses the three variables from check 1. restic init asks you to choose a repository password.

export RESTIC_REPOSITORY=\
s3:https://s3.amanahcloud.bh/clinic-backups/restic

restic init
restic backup /srv/backups
Veeam Backup & Replication, Synology Hyper Backup, DuplicatiChoose the S3-compatible option, then enter the endpoint, the region and your key.
AWS SDKsSet the endpoint URL and the region in the client, and sign with your key.

What the API does today

Watad is not a full copy of S3. This is what is there, where you set it, and what is not offered.

Works today

  • Put, get, delete and copy, with metadata
  • Multipart upload
  • Listing with prefix, delimiter and paging
  • Presigned URLs for GET and PUT

Set in the console

  • Keys scoped to one bucket
  • Versioning and lifecycle rules
  • CORS for a bucket
  • Public-read policy
  • Share links, organisations and roles

Not offered

  • Retention locks and legal hold
  • Encryption at rest by default
  • Replication
  • S3 ACLs, IAM and STS
  • Bucket notifications
  • Single sign-on

Stuck on a check?

Tell us which one and what you saw. A person will reply.