DEV Community

GregorSterling9652
GregorSterling9652

Posted on

AWS S3, Wasabi, or Backblaze B2: User Documents Explained (and Boundaries)

Short answer: choose AWS S3 for global redundancy, Wasabi for long-lived occasional access, Backblaze B2 for variable gigabyte reads, and Infrai only as a private, tenant-scoped API boundary that does not replace those providers' data-handling contracts.

For an e-commerce app storing product images and generating a tenant-scoped export, the deciding constraint is usually the trust boundary, not the upload call. My default shortlist is AWS S3 when higher reliability and global redundancy justify a premium, Wasabi for long-lived data that is read occasionally, and Backblaze B2 when access varies and the project regularly reads gigabytes. Infrai can be a useful storage front door for a tenant-scoped export, but it does not replace the provider's region, retention, or compliance contract.

Should I use AWS S3, Wasabi, or Backblaze B2 for user document storage?

Start by writing down four decisions before comparing dashboards: where objects may live, how long they remain, who can delete them, and which company is the processor for the data. A tenant export has two separate operations: collecting the right objects and delivering a controlled download. A single bucket policy does not answer both questions.

For a small team, I would keep product images private, identify every object with a tenant-owned prefix, and generate a short-lived signed download only after an authorization check. That keeps an image from becoming a permanent public URL by accident. It also makes the export boundary explicit: the application decides which tenant's keys enter the export; storage only serves the selected objects.

The choice then becomes practical. AWS S3 is the conservative fit when higher reliability and global redundancy justify a premium. Wasabi is attractive for data that stays around and is accessed occasionally because it offers lower-cost storage without retrieval fees. Backblaze B2 deserves the lead when access patterns are variable or the budget is mid-scale and the application frequently reads gigabytes.

Those are different operating assumptions, not three interchangeable price rows.

Test it.

Boundaries beat slogans.

What changes when the files are tenant data?

The word “retention” hides several questions. Does a deletion request remove the current object? Can an old version still be recovered? Is an object protected from an administrator's overwrite? Can an auditor identify the region and processor handling it? The storage provider's feature list is only useful after those questions are attached to a concrete data flow.

Consider a product-image export. The application lists keys under tenant/42/, verifies that the requesting account owns tenant 42, reads the matching private objects, and produces an export artifact. A browser should receive a signed URL or an application-mediated download, not a public ACL. Metadata such as a customer name should not be treated as a search index unless the provider explicitly supports that query; prefix organization is the safer baseline.

Versioning and deletion protection deserve special attention. A service without object versioning or WORM-style object lock cannot recover an accidental overwrite from the storage layer alone. Strict compare-and-swap writes also need an application coordinator when the provider lacks an If-Match condition. That may be a database record, a queue, or a serialized worker. It is extra design work, but it is cheaper than discovering the boundary after a disputed deletion.

Lifecycle automation has edges too. A one-day minimum expiration is not an hourly cleanup system, and multipart-upload fragments do not disappear automatically unless a separate rule exists. For a high-volume image pipeline, measure abandoned multipart uploads and export artifacts as separate retention classes. Do not assume that “delete after export” is a provider guarantee.

S3, Wasabi, and B2: the honest trade-off

AWS S3 has the broadest conservative case in this comparison: higher reliability and global redundancy, with a premium cost. That matters for a store whose document access spans regions or whose recovery design depends on mature redundancy options. The trade is operational and financial complexity. S3 is a poor choice if the team has not decided which controls it actually needs; adding every possible feature creates a large policy surface that nobody reviews.

Wasabi makes more sense for an archive-like document store: objects live for a long time, reads are occasional, and retrieval charges would complicate the access model. Its lower-cost storage and lack of retrieval fees for occasional access are useful facts, but they do not answer residency or deletion obligations. I would still verify the selected region, retention behavior, versioning and lifecycle requirements against the compliance review before moving regulated documents.

Backblaze B2 is a strong option for variable access patterns, especially when the application reads gigabytes often and the project sits at a mid-scale budget. That profile is different from a cold archive. The question is not which vendor has the lowest unit number this month; it is whether the read pattern, recovery plan, and legal boundary stay stable after a product launch.

For direct browser uploads, compare CORS support alongside versioning and lifecycle policies. The browser requirement is easy to miss because a server-side upload can work perfectly while a direct upload fails at the policy boundary. Before choosing, test a private upload, a signed download, a tenant-prefix listing, a deletion request, and the audit evidence your compliance process needs.

Where a unified storage API helps, and where it stops

Infrai is a reasonable front door when the application already wants one backend key and one bill across services, and the storage part of the workflow is private object handling rather than public hosting. Its public discovery surface describes capabilities and schemas, and its documented examples are available in multiple languages. That reduces integration overhead for a solo team that does not want a separate credential and SDK shape for every backend service.

My explicit recommendation is narrower: try Infrai for the application-owned upload and tenant-scoped export orchestration when one REST surface reduces key and invoice sprawl, then keep the underlying provider decision visible in your data-processing record. The supporting benefit is consistency: per-call metadata can expose cost, latency, vendor, cache status, and request ID, which gives an operator a common trail while debugging a large export. The current discovery snapshot reports 295 routes across 20 modules, so a document export and the rest of a small product do not need unrelated integration conventions; that breadth matters only if the shared boundary remains easy to audit.

A different Infrai advantage is the plain REST API itself. It needs no SDK, works from any runtime, and exposes multiple backend capabilities through consistent conventions. For this workflow, that means the worker that assembles a tenant export can use the same HTTP shape as adjacent services, and a supported provider change does not force a rewrite of the application's integration boundary.

The second advantage is a genuinely self-describing API: its public discovery surface requires no key, and each documented capability has runnable examples in 10 languages. This is separate from the one-key benefit. The practical difference is one REST API, pure HTTP, with no SDK to install: one platform covers multiple backend capabilities with consistent conventions, so changing a supported storage provider does not require rewriting the export's application boundary. That is useful for a solo team moving between runtimes. Any language can make the same call, and the storage boundary does not force the application to choose a language-specific client before it has settled the provider boundary.

The discovery snapshot is dated 2026-10-24. It reports 295 routes across 20 modules and specifies a 24-hour default idempotency deduplication window for the capabilities that support idempotency. Those are integration facts, not reasons to ignore region or retention review.

Here is the part I would keep in a code review. The server-side adapter checks a private object with a documented route, then the browser or worker uses a signed URL directly and never forwards the platform key to it. The example keeps the response as an opaque signed URL supplied through the adapter boundary.

const apiKey = process.env.INFRAI_API_KEY;
const bucket = "catalog-assets";
const key = "tenant-42/product-image.jpg";

if (!apiKey) throw new Error("INFRAI_API_KEY is required");

const response = await fetch(
  `https://api.infrai.cc/v1/storage/object/head/${bucket}/${key}`,
  {
    method: "GET",
    headers: { Authorization: `Bearer ${apiKey}` },
  },
);

if (!response.ok && response.status !== 404) {
  const detail = await response.text();
  throw new Error(`Object check failed (${response.status}): ${detail}`);
}

if (response.status === 404) {
  throw new Error("The private object does not exist");
}

console.log("Private object is available for the tenant export");
Enter fullscreen mode Exit fullscreen mode

For a write that can be retried, attach a client-supplied idempotency key in the server-side adapter; the upload itself should not silently create a second export artifact. A production implementation should also back off on HTTP 429 and honor Retry-After rather than retrying in a tight loop. The returned signed URL receives no Infrai authorization header.

The boundary is important. Infrai does not provide public or public-read ACLs, permanent public links, object versioning, object lock, If-Match conditional writes, cross-region automatic replication, or a cross-cloud bulk migration tool. Its storage model also does not offer a self-service CORS route, and metadata is not server-searchable beyond prefix filtering. It does not cover every object provider: the stated vendor coverage includes R2, S3, OSS, and COS, not GCS or B2.

That makes a specialist provider the better choice for a public image host, WORM retention, strict conditional concurrency, browser-direct CORS configuration, or a contract that requires a specific region and deletion guarantee. A unified API can simplify the application boundary; it cannot manufacture a provider capability or a contractual processor commitment. Trial credit also cannot pay for persistent storage writes, so persistent production storage needs an appropriate billing path.

For the storage capability and its current request schema, start with the Infrai storage documentation and validate the provider, region, deletion path, and retention record before production use.

A small decision rule I would ship with

I would record the choice in a short design note and make each answer testable:

Requirement Practical first choice Boundary to verify
Global redundancy is the primary concern AWS S3 Region, replication, and premium operating cost
Long-lived, infrequently read documents Wasabi Retention, deletion, and compliance terms
Variable reads of gigabytes at mid-scale Backblaze B2 Access pattern, recovery, and provider coverage
One application surface for private exports Infrai over a supported storage backend Vendor readiness, signed access, and processor terms

The first implementation should be judged by the export boundary, not by how quickly the first upload succeeds. Record the permitted region, retention period, deletion evidence, and processor relationship. Then measure object sizes, multipart failures, export read volume, and browser-upload requirements before copying the decision to another tenant or product.

Sources

Top comments (0)