Docs

Objects

Objects are the files in a bucket, addressed by their key. This page describes the object operations of the chili S3 API. All examples use path style and the endpoint https://s3-ch-east.chilistorage.com.

Limits

Limit

Value

Maximum object size

5 TB

Maximum size of a single PUT

5 GB

Above that

Multipart upload

The AWS CLI (aws s3 cp) and the AWS SDKs switch to multipart upload for large files on their own.

Operations

Operation

Method and path

Notes

PutObject

PUT /{bucket}/{key}

Create or overwrite an object

GetObject

GET /{bucket}/{key}

Also byte ranges and older versions

HeadObject

HEAD /{bucket}/{key}

Metadata only

DeleteObject

DELETE /{bucket}/{key}

With versioning: delete marker

DeleteObjects

POST /{bucket}?delete

Up to 1000 keys per request

CopyObject

PUT /{bucket}/{key} with x-amz-copy-source

Server-side copy

GetObjectAttributes

GET /{bucket}/{key}?attributes

Size, ETag, checksums, parts

SelectObjectContent

POST /{bucket}/{key}?select&select-type=2

SQL query on CSV, JSON, Parquet

CORS preflight requests (OPTIONS) are described in Access & CORS.

Operations in detail

PutObject

PUT /my-bucket/reports/2026-11.pdf HTTP/1.1
Host: s3-ch-east.chilistorage.com
Content-Type: application/pdf
Content-Length: 482113
Content-MD5: <MD5 of the body, Base64>
x-amz-meta-department: finance

If the key already exists, the object is overwritten. If versioning is enabled, a new version is created instead.

Header

Meaning

Content-Type

MIME type, returned by GetObject

Content-MD5

Base64-encoded MD5 hash of the body; chili rejects the request if it does not match

x-amz-checksum-crc32, -crc32c, -sha1, -sha256

Alternative checksums, Base64-encoded

x-amz-meta-*

Your own metadata as key-value pairs

If-None-Match: *

Write only if the key does not exist yet; otherwise 412 Precondition Failed

The response contains the ETag and, with versioning enabled, the x-amz-version-id. Object Lock headers on upload are described in Object Lock (API).

aws s3api put-object --bucket my-bucket --key reports/2026-11.pdf \
  --body 2026-11.pdf --content-type application/pdf \
  --metadata department=finance \
  --endpoint-url https://s3-ch-east.chilistorage.com

GetObject

GET /my-bucket/reports/2026-11.pdf HTTP/1.1
Host: s3-ch-east.chilistorage.com
Range: bytes=0-1023

Header or parameter

Meaning

versionId

Read a specific version, otherwise the current one

Range

Load only a byte range, such as bytes=0-1023; response 206 Partial Content

If-Match / If-None-Match

Return only if the ETag matches or does not match (412 or 304)

If-Modified-Since / If-Unmodified-Since

Return only if modified or not modified since that time (304 or 412)

response-content-type, response-content-disposition

Override response headers, for example for downloads via pre-signed URLs

x-amz-checksum-mode: ENABLED

Include the stored checksum in the response

aws s3api get-object --bucket my-bucket --key reports/2026-11.pdf \
  --range bytes=0-1023 head.bin \
  --endpoint-url https://s3-ch-east.chilistorage.com

HeadObject

HEAD /my-bucket/reports/2026-11.pdf HTTP/1.1
Host: s3-ch-east.chilistorage.com

Returns the same headers as GetObject, but no body: Content-Length, Content-Type, ETag, Last-Modified, x-amz-meta-* and, with versioning, x-amz-version-id. The versionId parameter and the If-* headers work as with GetObject. A missing object returns 404 without an error text, because HEAD has no body.

aws s3api head-object --bucket my-bucket --key reports/2026-11.pdf \
  --endpoint-url https://s3-ch-east.chilistorage.com

DeleteObject

DELETE /my-bucket/reports/2026-11.pdf HTTP/1.1
Host: s3-ch-east.chilistorage.com

Case

Effect

Bucket without versioning

The object is deleted

Bucket with versioning, no versionId

chili adds a delete marker; older versions are kept

With versionId

Exactly this version is permanently deleted

Version under Object Lock

Deletion is refused until the retention expires

The response is 204 No Content, even if the key does not exist. Details on versions and delete markers in Versioning.

aws s3api delete-object --bucket my-bucket --key reports/2026-11.pdf \
  --endpoint-url https://s3-ch-east.chilistorage.com

DeleteObjects

POST /my-bucket?delete HTTP/1.1
Host: s3-ch-east.chilistorage.com
Content-MD5: <MD5 of the body, Base64>
Content-Type: application/xml
<Delete>
  <Quiet>true</Quiet>
  <Object><Key>tmp/a.log</Key></Object>
  <Object><Key>tmp/b.log</Key><VersionId>3HL4kqtJlcpXroDTDmJ.rmSpXd3dIbrHY</VersionId></Object>
</Delete>

Deletes up to 1000 keys in one request. Send Content-MD5; the AWS CLI and SDKs compute the hash automatically. With <Quiet>true</Quiet> the response lists only errors. Without Quiet, every key appears under <Deleted> or <Error>. Always check the <Error> entries, because the request as a whole succeeds (200) even if individual keys were not deleted.

aws s3api delete-objects --bucket my-bucket \
  --delete '{"Objects":[{"Key":"tmp/a.log"},{"Key":"tmp/b.log"}],"Quiet":true}' \
  --endpoint-url https://s3-ch-east.chilistorage.com

CopyObject

PUT /my-bucket/archive/2026-11.pdf HTTP/1.1
Host: s3-ch-east.chilistorage.com
x-amz-copy-source: /my-bucket/reports/2026-11.pdf
x-amz-metadata-directive: COPY

Copies an object on the server side, without loading the data through your client.

Header

Meaning

x-amz-copy-source

Source as /{bucket}/{key}, optionally with ?versionId=... for a specific version

x-amz-metadata-directive

COPY keeps the source metadata (default), REPLACE uses the metadata from the request

To change only an object's metadata, copy it onto itself with REPLACE. Copying the same version onto itself unchanged with COPY is not allowed. For objects over 5 GB, use multipart upload with UploadPartCopy; aws s3 cp does this automatically.

aws s3api copy-object --bucket my-bucket --key archive/2026-11.pdf \
  --copy-source my-bucket/reports/2026-11.pdf \
  --endpoint-url https://s3-ch-east.chilistorage.com

GetObjectAttributes

GET /my-bucket/backup.tar?attributes HTTP/1.1
Host: s3-ch-east.chilistorage.com
x-amz-object-attributes: ETag,ObjectSize,ObjectParts,Checksum

Returns selected attributes of an object in one response, without loading the data. Possible values for x-amz-object-attributes are ETag, Checksum, ObjectParts, StorageClass and ObjectSize. For objects from a multipart upload, ObjectParts lists the parts; page through them with x-amz-max-parts and x-amz-part-number-marker. Optionally pick a version with versionId.

<GetObjectAttributesResponse>
  <ETag>"d41d8cd98f00b204e9800998ecf8427e-12"</ETag>
  <ObjectSize>1258291200</ObjectSize>
  <ObjectParts>
    <PartsCount>12</PartsCount>
  </ObjectParts>
</GetObjectAttributesResponse>
aws s3api get-object-attributes --bucket my-bucket --key backup.tar \
  --object-attributes ETag ObjectSize ObjectParts \
  --endpoint-url https://s3-ch-east.chilistorage.com

Encryption with your own key (SSE-C)

chili supports server-side encryption with a key that you provide (SSE-C). With PutObject you send your own 256-bit AES key. chili encrypts the object with it and does not store the key. When you read the object with GetObject, you send the same key again.

Header

Value

x-amz-server-side-encryption-customer-algorithm

AES256

x-amz-server-side-encryption-customer-key

your 256-bit key, Base64-encoded

x-amz-server-side-encryption-customer-key-MD5

MD5 checksum of the key, Base64-encoded

Under the S3 standard, HeadObject, CopyObject and the parts of a multipart upload need the same headers when they involve an SSE-C object.

With newer versions of the AWS CLI, first run aws configure set request_checksum_calculation when_required (see Quickstart).

# Create a key (32 bytes) and keep it safe
openssl rand -out sse-c.key 32

# Upload with SSE-C
aws s3 cp backup.tar s3://my-bucket/backup.tar \
  --sse-c AES256 --sse-c-key fileb://sse-c.key \
  --endpoint-url https://s3-ch-east.chilistorage.com

# Download with the same key
aws s3 cp s3://my-bucket/backup.tar ./backup.tar \
  --sse-c AES256 --sse-c-key fileb://sse-c.key \
  --endpoint-url https://s3-ch-east.chilistorage.com

Important: if you lose the key, the data can no longer be read. chili cannot recover it either. Manage your keys in a secret store or key management system.

SelectObjectContent (S3 Select)

POST /my-bucket/data/customers.csv?select&select-type=2 HTTP/1.1
Host: s3-ch-east.chilistorage.com

With S3 Select, chili filters an object on the server with an SQL expression and returns only the matching records. Input formats are CSV, JSON and Parquet, optionally compressed with GZIP or BZIP2. Only SELECT is supported.

aws s3api select-object-content --bucket my-bucket --key data/customers.csv \
  --expression "SELECT s.name, s.city FROM S3Object s WHERE s.country = 'CH'" \
  --expression-type SQL \
  --input-serialization '{"CSV":{"FileHeaderInfo":"USE"},"CompressionType":"NONE"}' \
  --output-serialization '{"CSV":{}}' \
  result.csv \
  --endpoint-url https://s3-ch-east.chilistorage.com

Next