S3-compatible API
Point the AWS CLI, an AWS SDK, boto3 or rclone at your buckets over a path-style S3 endpoint.
Gigadrive Network buckets answer the S3 API, so anything that already speaks S3 works after an endpoint override. Use it for bulk copies and migrations, and for integrations that know no other way to move a file.
Connection settings
| Setting | Value |
|---|---|
| Endpoint | https://api.gigadrive.network/s3 |
| Region | us-east-1 |
| Addressing | Path style, forcePathStyle: true |
| Bucket name | The bucket's slug |
| Credentials | An S3 credential for the environment |
The region is a formality: any region string authenticates, and us-east-1 is what the console shows. Send that one and clients that insist on a region will stop complaining.
S3 clients address the slug, not the name
A bucket has two identifiers. user-uploads is the name you use in the REST API, the SDK and gigadrive.yaml;
user-uploads-k7qm4ztb is the globally unique slug, and that is the bucket name an S3 client has to send. The console
lists the slugs of every bucket in the environment on the S3 credentials page.
Connecting a client
Each snippet lists the objects in one bucket and uploads a file.
export AWS_ACCESS_KEY_ID=GAK7QM4ZTB2XVC5HJ3RN
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY
export AWS_DEFAULT_REGION=us-east-1
aws --endpoint-url https://api.gigadrive.network/s3 \
s3 ls s3://user-uploads-k7qm4ztb
aws --endpoint-url https://api.gigadrive.network/s3 \
s3 cp ./avatar.png s3://user-uploads-k7qm4ztb/avatars/user-123.pngVirtual-host addressing, where the bucket becomes a subdomain of the endpoint, is not served at all. Path style is the setting to check first when a client cannot see a bucket you know exists.
Authentication
Signature Version 4, in the Authorization header or as presigned query parameters, both with aws-chunked payloads. The service name has to be s3; the region in the credential scope is accepted whatever it says. Requests signed more than 15 minutes away from the server clock are rejected with RequestTimeTooSkewed.
Credentials are read from the database on every request, so revoking one takes effect on the next call rather than after a cache expires. A credential belongs to one application environment: addressing a bucket in a different environment returns AccessDenied.
Supported operations
| Level | Operations |
|---|---|
| Service | ListBuckets, which lists the buckets of the credential's environment |
| Bucket | CreateBucket, DeleteBucket, HeadBucket, ListObjectsV2, DeleteObjects, ListMultipartUploads |
| Bucket metadata | GetBucketLocation, GetBucketVersioning, GetBucketAcl |
| Object | GetObject including Range, HeadObject, PutObject, CopyObject, DeleteObject |
| Object tags | GetObjectTagging, PutObjectTagging, DeleteObjectTagging |
| Multipart | CreateMultipartUpload, UploadPart, ListParts, CompleteMultipartUpload, AbortMultipartUpload |
ListObjectsV2 supports prefix, delimiter, max-keys, continuation-token, start-after and marker. CopyObject is served without moving bytes: the copy points at the same stored content. An HTTP method the endpoint does not handle answers MethodNotAllowed, and UploadPartCopy answers NotImplemented.
Differences from Amazon S3
CreateBucket takes the name you send as both the bucket name and its globally unique slug. A name somebody else already holds answers BucketAlreadyExists; one of your own answers BucketAlreadyOwnedByYou. Creating buckets from the console, the API or gigadrive.yaml avoids the collision, because Network generates the slug for you. x-amz-acl: public-read on CreateBucket makes the new bucket public.
DeleteObject and DeleteObjects are soft deletes. The object moves to the bucket trash, stays restorable, and keeps counting toward stored bytes until it is purged. A tool that expects DeleteObject to reclaim space will not see that happen here.
Object versioning does not exist. GetBucketVersioning answers an empty configuration, and writing to a key that already holds an object replaces it.
Errors
Failures come back as the standard S3 XML <Error> document. The codes you are most likely to hit:
| Code | Status | Cause |
|---|---|---|
NoSuchBucket | 404 | No bucket anywhere has that slug |
NoSuchKey | 404 | No live object at that key |
AccessDenied | 403 | The credential does not own the bucket's environment |
InvalidAccessKeyId | 403 | The access key was revoked or never existed |
SignatureDoesNotMatch | 403 | The signature did not verify against the request as received |
RequestTimeTooSkewed | 403 | Client clock is off by more than 15 minutes |
BucketNotEmpty | 409 | DeleteBucket on a bucket that still holds objects |
EntityTooSmall | 400 | A non-final part below 5 MiB |
InvalidPartOrder | 400 | Parts listed out of ascending order on complete |
InvalidRange | 416 | Range outside the object |
