Skip to main content

S3 API compatibility

Loch S3 only accepts path-style URLs: /{bucket} and /{bucket}/{key}. Any region is accepted in the signature.

Supported operations​

OperationRoute
ListBucketsGET /
CreateBucketPUT /{bucket} (a LocationConstraint body is ignored)
HeadBucketHEAD /{bucket}
DeleteBucketDELETE /{bucket}
ListObjectsV2GET /{bucket} with prefix, delimiter, max-keys (up to 1000), start-after, continuation-token
PutObjectPUT /{bucket}/{key}
CopyObjectPUT /{bucket}/{key} with x-amz-copy-source; x-amz-metadata-directive: COPY or REPLACE
GetObjectGET /{bucket}/{key}, optional Range and versionId
HeadObjectHEAD /{bucket}/{key}, optional versionId
DeleteObjectDELETE /{bucket}/{key}, optional versionId
CreateMultipartUploadPOST /{bucket}/{key}?uploads
UploadPartPUT /{bucket}/{key}?partNumber=N&uploadId=X (N from 1 to 10,000)
CompleteMultipartUploadPOST /{bucket}/{key}?uploadId=X
AbortMultipartUploadDELETE /{bucket}/{key}?uploadId=X
ListPartsGET /{bucket}/{key}?uploadId=X
ListMultipartUploadsGET /{bucket}?uploads
Put/GetBucketVersioningPUT, GET /{bucket}?versioning
ListObjectVersionsGET /{bucket}?versions
Put/Get/DeleteBucketPolicyPUT, GET, DELETE /{bucket}?policy
Put/Get/DeleteBucketCorsPUT, GET, DELETE /{bucket}?cors
CORS preflightOPTIONS /{bucket} or /{bucket}/{key}
Put/GetBucketAclPUT, GET /{bucket}?acl (canned x-amz-acl or XML body)
Put/GetObjectAclPUT, GET /{bucket}/{key}?acl
Put/Get/DeleteBucketEncryptionPUT, GET, DELETE /{bucket}?encryption (AES256 only)

Presigned URLs work for any of these operations.

Authentication​

MethodDetail
Header SigV4Authorization: AWS4-HMAC-SHA256 …. host and every x-amz-* header must be signed
Presigned URLX-Amz-* query parameters, X-Amz-Expires from 1 to 604,800 seconds
x-amz-content-sha256A SHA-256 hash (verified), UNSIGNED-PAYLOAD, STREAMING-AWS4-HMAC-SHA256-PAYLOAD[-TRAILER] (chunk signatures verified) or STREAMING-UNSIGNED-PAYLOAD-TRAILER. Other values are refused

Not supported​

FeatureNote
Virtual-hosted-style URLsUse path-style
ListObjects v1GET /{bucket} always answers in the V2 format; marker is ignored
DeleteObjects (multi-object delete)405
GetBucketLocation (?location)Not implemented
partNumber on GetObjectIgnored, the whole object is returned
Multi-range Range headersIgnored, the whole object is returned
Tagging, lifecycle, replication, object lock, website, logging, notificationsNot implemented
SSE-KMS, IAM, STS, regionsNot implemented
Content-MD5 and x-amz-checksum-*Not verified
warning

Requests for an unsupported sub-resource are not always refused: they can be handled as the plain operation on the same path. For example PUT /{bucket}/{key}?tagging replaces the object with the request body. Do not send tagging or lifecycle requests to Loch S3.