Skip to content

User Guide

This guide covers everything you need to know about using Hafiz.

Core Concepts

  • Buckets


    Create, configure, and manage storage containers.

    Buckets

  • Objects


    Upload, download, and manage objects.

    Objects

  • Versioning


    Keep multiple versions of objects.

    Versioning

  • Access Control


    Control who can access your data.

    Access Control

  • Encryption


    Encrypt data at rest and in transit.

    Encryption

  • Object Lock


    WORM compliance for regulatory requirements.

    Object Lock

Quick Examples

import boto3

s3 = boto3.client('s3',
    endpoint_url='http://localhost:9000',
    aws_access_key_id='hafizadmin',
    aws_secret_access_key='hafizadmin'
)

# Upload
s3.put_object(Bucket='my-bucket', Key='file.txt', Body=b'Hello!')
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";

const client = new S3Client({
  endpoint: "http://localhost:9000",
  forcePathStyle: true,
});

await client.send(new PutObjectCommand({
  Bucket: "my-bucket",
  Key: "file.txt",
  Body: "Hello!",
}));
aws --endpoint-url http://localhost:9000 \
    s3 cp file.txt s3://my-bucket/