Skip to content

ZERO-Z3 with the AWS CLI

The AWS CLI works against ZERO-Z3 unchanged; only the endpoint URL and the region name differ. Keys come from the customer portal.

Configure

aws configure --profile zero-z3
# AWS Access Key ID:      YOUR_ACCESS_KEY
# AWS Secret Access Key:  YOUR_SECRET_KEY
# Default region name:    zero-fra2
# Default output format:  json

Region names and endpoints: zero-fra1fra1.s3.zeroservices.eu, zero-fra2fra.s3.zeroservices.eu, zero-eyl1eyl1.s3.zeroservices.eu. See S3 clients for the full table.

Use

export ZERO_Z3_ENDPOINT=https://fra.s3.zeroservices.eu

aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT s3 ls s3://my-bucket/
aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT s3 cp file.txt s3://my-bucket/
aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT s3 sync ./local s3://my-bucket/prefix/
aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT s3 rm s3://my-bucket/file.txt

Bucket policy

Public read access for a download area or a static site:

aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT s3api put-bucket-policy \
    --bucket my-bucket --policy file://policy.json
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Principal": "*",
    "Action": ["s3:GetObject"],
    "Resource": ["arn:aws:s3:::my-bucket/*"]
  }]
}

Users and keys (IAM)

aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT iam list-access-keys
aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT iam create-access-key

aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT iam create-user --user-name myapp
aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT iam create-access-key --user-name myapp
aws --profile zero-z3 --endpoint-url $ZERO_Z3_ENDPOINT iam attach-user-policy \
    --user-name myapp --policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess

Your bucket already exists; it was created with your order. One account holds one bucket, see accounts and buckets.