Bun 1.2 Ships a Native S3 Client That Works Across Alibaba, Tencent, and Huawei Cloud
Multi-cloud object storage has been a grind of incompatible SDKs, heavy dependencies, and slow cold starts. A native S3 client in the runtime collapses that complexity: one API, no node_modules bloat, and a 10x speedup that makes serverless and edge deployments far cheaper to run.
The S3 protocol has become the universal object-storage interface, and every major Chinese cloud vendor now offers 100% S3-compatible endpoints. Bun 1.2 is the first JavaScript runtime to embed an S3 client directly, eliminating the need for vendor-specific SDKs like ali-oss or cos-nodejs-sdk-v5. A single S3Client instance handles uploads, downloads, presigned URLs, and streaming across Alibaba, Tencent, and Huawei with only an endpoint change.
Performance benchmarks show Bun's Zig-based HTTP layer delivering roughly 10x the throughput of the Node.js aws-sdk v3, while cold-start overhead drops from 80 MB to zero. The client also supports direct fetch-to-storage streaming, meaning a network resource can be saved to a bucket without buffering it in memory first.
A factory pattern wrapping the three providers' configs lets teams switch clouds by flipping one string. Presigned upload URLs work identically across all three, enabling browser-to-cloud direct transfers that keep file traffic off application servers and cut CDN costs.
Baking an S3 client into the runtime is a strategic bet that S3 compatibility has won as the universal object-storage interface, making vendor-specific SDKs legacy cruft.
The 10x performance gap comes from bypassing Node's HTTP stack entirely; Bun's Zig-based client avoids V8 and libuv overhead that dominates cold-start and throughput in serverless environments.
Direct fetch-to-storage streaming eliminates a whole class of memory-pressure bugs that appear when proxying large files through Node.js servers.
Presigned URL support across Alibaba, Tencent, and Huawei with a single API call removes the last excuse for routing upload traffic through application servers, which is both expensive and slow.
Multi-cloud portability stops being a architectural tax when the runtime itself provides the abstraction; the factory pattern shown here is trivial because the hard work moved into the platform.
The lone comment challenges the article's implied architecture, arguing that externalizing configuration eliminates the need for a strategy pattern and that a hardcoded approach breaks when a new cloud provider appears.
By that logic, why not just externalize all the configs? Do you even need the strategy pattern? Tomorrow a new cloud comes along, and you're stuck, right?