
The AIOZ Storage JavaScript SDK is the standard AWS SDK for JavaScript v3, @aws-sdk/client-s3, pointed at the AIOZ Storage endpoint, so you don't install any AIOZ package. This quickstart gives you the client config, the upload, list, download and delete code, and the errors you will most likely hit.
TL;DR:
@aws-sdk/client-s3. There is no separate AIOZ package, and AIOZ's own JavaScript docs import this one.region: 'us-east-1', the https://s3.aiozstorage.network endpoint, forcePathStyle: true, and both checksum settings to WHEN_REQUIRED.MissingContentLength. We reproduced both on Nov 4, 2026.Updated Nov 4, 2026: we reran the client config against the live endpoint with client-s3 3.1161.0 and added the errors we got, a file upload from disk, list pagination, a request diagram and an answer-first opening.
No, and you don't need one, because AIOZ Storage speaks the S3 API. You use @aws-sdk/client-s3, the same official package you would use against Amazon S3, and you install it in your Node.js project with one command:
npm install @aws-sdk/client-s3We tested every sample here with version 3.1161.0, the latest release on npm on Nov 4, 2026. That release lists Node.js 20 or newer in its engines field, so check your runtime before you start. For the bigger picture, see what AIOZ Storage is and how its S3 API works. The AIOZ Storage developer platform guide then maps every SDK and tool you can use with it.
AIOZ's docs give the core of this configuration, and we filled in the endpoint that the docs leave as a placeholder. We also added the two checksum lines and read the keys from environment variables, the way the docs' setup step suggests:
import { PutObjectCommand, S3Client } from '@aws-sdk/client-s3'
const s3Client = new S3Client({
region: 'us-east-1',
credentials: {
accessKeyId: process.env.ACCESS_KEY,
secretAccessKey: process.env.SECRET_KEY
},
endpoint: {
url: 'https://s3.aiozstorage.network'
},
forcePathStyle: true,
requestChecksumCalculation: 'WHEN_REQUIRED',
responseChecksumValidation: 'WHEN_REQUIRED'
})Each setting has a job, and leaving any of them out breaks your requests in a different way:
region: The SDK needs a region to sign each request. AIOZ Storage isn't split into regions, so the docs use us-east-1 as a placeholder, the same value the Python docs use.endpoint: Sends your requests to AIOZ Storage over HTTPS instead of to Amazon.forcePathStyle: Puts the bucket name in the path, as in s3.aiozstorage.network/your-bucket/key. Without it, the SDK builds your-bucket.s3.aiozstorage.network, a hostname that has no DNS record.The checksum problem comes from a recent SDK change. Beginning with version 3.729.0, the SDK calculates a CRC32 checksum for every upload by default (AWS checksum guide). For a stream body, it sends that checksum as a trailer in a chunked body that carries no Content-Length. Setting both options to WHEN_REQUIRED turns that default off (S3Client options).

async function uploadFile(bucket, key, body) {
const command = new PutObjectCommand({
Bucket: bucket,
Key: key,
Body: body
})
return s3Client.send(command)
}
await uploadFile('your-bucket', 'hello.txt', 'Hello from AIOZ Storage')Every operation in the v3 SDK follows this pattern: you build a command object with the parameters, then pass it to s3Client.send(). The Body can be a string, a Buffer, a Uint8Array or a file stream, so you rarely need to convert your data first.
import fs from 'fs'
import path from 'path'
const filePath = './report.pdf'
await s3Client.send(new PutObjectCommand({
Bucket: 'your-bucket',
Key: path.basename(filePath),
Body: fs.createReadStream(filePath),
ContentType: 'application/pdf'
}))This is the shape of AIOZ's own minimal example, and it works because the SDK can read the file size from disk. Its body-length helper calls lstatSync on the stream's path to set Content-Length (we read this in @smithy/core 3.38.1). A stream with no file behind it, such as an HTTP request you pipe through, has no size the SDK can read. In our test, that upload failed with MissingContentLength even with both checksum settings in place. Buffer that kind of body first, or pass ContentLength yourself when you know the size.
Always set ContentType in JavaScript. When we left it out, client-s3 3.1161.0 sent Content-Type: application/octet-stream on its own (we recorded the header with a local test server). Under AIOZ's documented rule, a Content-Type you send is used as is, so content-based detection wouldn't run on that upload. Our guide to automatic MIME type detection on AIOZ Storage explains when that detection does run.
import { ListObjectsV2Command, GetObjectCommand } from '@aws-sdk/client-s3'
async function listFiles(bucket) {
const command = new ListObjectsV2Command({ Bucket: bucket })
const response = await s3Client.send(command)
return (response.Contents || []).map(obj => obj.Key)
}
async function downloadFile(bucket, key) {
const command = new GetObjectCommand({ Bucket: bucket, Key: key })
const response = await s3Client.send(command)
return response.Body.transformToString()
}In the v3 SDK, response.Body is a stream rather than a string, which is why downloadFile calls transformToString() on it. For images or other binary files, call transformToByteArray() instead and you get a Uint8Array back.
One list call doesn't always return every key in your bucket. In the S3 API, ListObjectsV2 returns up to 1,000 keys per request (AWS API reference). When IsTruncated comes back true, send the call again with ContinuationToken set to the NextContinuationToken you received, and keep looping until the flag is false.
import { DeleteObjectCommand } from '@aws-sdk/client-s3'
async function deleteFile(bucket, key) {
const command = new DeleteObjectCommand({ Bucket: bucket, Key: key })
return s3Client.send(command)
}Deleting works the same way: build the command, then send it. In the S3 API, a delete against a key that doesn't exist still returns a 204 success rather than an error (AWS DeleteObject reference). So a successful delete doesn't prove the file was there, and you need a HeadObjectCommand first if that matters to your app.
We ran the file upload above against the live endpoint on Nov 4, 2026, with fake keys and three client configs. This is the real output of our test script, one line per config:
post_config S3 error: InvalidAccessKeyId - The Access Key Id you provided does not exist in our records. (HTTP 403)
sdk_default_checksums S3 error: MissingContentLength - You must provide the Content-Length HTTP header. (HTTP 411)
no_path_style non-S3 error: Error ENOTFOUND getaddrinfo ENOTFOUND your-bucket.s3.aiozstorage.networkEach line tells you something different about your setup, so match your own error to one of these:
InvalidAccessKeyId (403): Your client config is right, and the request got as far as the key check. With real keys from an access grant, this is where your upload goes through. If you see it with real keys, check that you pasted the access key into accessKeyId and not the secret.MissingContentLength (411): The SDK sent a chunked body. Add both checksum settings, and make sure your body has a known length.ENOTFOUND: The SDK tried a bucket subdomain. Add forcePathStyle: true.The endpoint also checks your clock. When we signed a request with a clock 20 minutes behind, it answered RequestTimeTooSkewed before it even checked the key, so sync your machine's clock if you see that error.
Every s3Client.send() call can reject, whether from a missing bucket, an expired credential or a network failure. Service errors arrive as a typed S3ServiceException that you can catch and inspect:
import { S3ServiceException } from '@aws-sdk/client-s3'
try {
await s3Client.send(command)
} catch (error) {
if (error instanceof S3ServiceException) {
console.error(`S3 error: ${error.name} - ${error.message} (HTTP ${error.$metadata.httpStatusCode})`)
} else {
throw error
}
}The error.name field gives you the S3 error code, such as NoSuchKey, NoSuchBucket or AccessDenied, and the HTTP status sits in error.$metadata.httpStatusCode. Our test script used this exact pattern to print the output above. A DNS failure isn't a service error, so it lands in the else branch, which is why the third line says "non-S3 error".
AIOZ Storage serves the S3 API from one HTTPS endpoint, https://s3.aiozstorage.network, so every request from your client lands in the same place. Your keys come from an access grant, which the dashboard creates for one bucket, a permission set and an end date. When you finish, it shows you an Access Key, a Secret Key and the Endpoint. You can set the end date anywhere from 24 hours to 1 year, and our guide to AIOZ Storage access grants walks through each step.
What the docs don't cover yet:
Upload helper in @aws-sdk/lib-storage, work against AIOZ Storage.We haven't run a full upload with real keys yet, so treat the success path as untested by us. Next step: open AIOZ's JavaScript SDK page and clone its code example repository.
What npm package do I need for the AIOZ Storage JavaScript SDK?
You need @aws-sdk/client-s3, the standard AWS SDK for JavaScript v3, because no separate AIOZ package exists.
Why does the S3Client need forcePathStyle: true for AIOZ Storage?
Without it, the SDK sends requests to a bucket subdomain such as your-bucket.s3.aiozstorage.network, which has no DNS record. Path style sends them to s3.aiozstorage.network/your-bucket instead, which resolves.
Why do I get MissingContentLength when I upload with the JavaScript SDK?
Since version 3.729.0, the SDK sends a CRC32 checksum by default and may stream the upload without a Content-Length header. Set requestChecksumCalculation and responseChecksumValidation to WHEN_REQUIRED, and give the body a known length.
Why does the client need a region if AIOZ Storage isn't region-partitioned?
The SDK uses the region to sign each request, and AIOZ's own documentation sets it to us-east-1 as a placeholder.
What does response.Body look like when downloading with the v3 SDK?
It's a stream, not a plain string or Buffer, so call transformToString() for text or transformToByteArray() for binary data.
Can I upload a file stream with PutObjectCommand?
Yes, if it's a file stream from fs.createReadStream, because the SDK reads the file size from disk. A stream of unknown length failed with MissingContentLength in our test, so buffer it first.
How do I catch and identify S3 errors in the JavaScript SDK?
Catch S3ServiceException, then read error.name for the error code and error.$metadata.httpStatusCode for the status.
Does deleting a nonexistent key throw an error?
No. In the S3 API, DeleteObjectCommand succeeds even if the key was never there, so it won't tell you whether anything was deleted.
Is the JavaScript SDK setup different from the Python (boto3) setup?
The pattern is the same and only the syntax differs: both need the custom endpoint, path-style addressing (forcePathStyle in JavaScript, addressing_style: path in boto3's Config) and the "when required" checksum settings.

Full vs incremental vs differential backup: what each run copies, how restore chains work, storage and time trade-offs, synthetic fulls and RPO/RTO fit.

RAID vs erasure coding: RAID guards the disks of one array, while erasure coding spreads k data and m parity pieces over nodes. Compare overhead and rebuilds.

Reed-Solomon coding turns k data pieces into n, and any k of them rebuild the original. See the polynomial math, GF(2^8), a demo and how AIOZ Storage uses it.

RPO vs RTO: RPO caps how much data you can lose, RTO caps how long you can stay down. See how to calculate both, MTD, and the DR strategies that meet them.

AWS Signature Version 4 signs each S3 request with an HMAC key derived from your secret. See the four steps, a worked example and the errors that break it.

Encryption at rest vs in transit: at rest guards stored bytes from stolen disks, in transit guards requests on the network with TLS. See what each one misses.