Alternative Storage Providers: 4 Free-Tier Checks for Storing E-commerce User Files in 2026
Choose storage by the isolation boundary you can test, not by the size of its free tier. For an e-commerce team storing training artifacts, the practical design is a tenant-scoped object key, an independent retention man
Choose storage by the isolation boundary you can test, not by the size of its free tier. For an e-commerce team storing training artifacts, the practical design is a tenant-scoped object key, an independent retention manifest, and alerts that distinguish policy failures from ordinary upload errors.
Short answer: treat a free tier as a trial constraint, never as the retention policy. Put tenant identity in the authorization decision, keep retention metadata beside the object, and test deletion and recovery with the same rigor as upload. That design travels across S3-compatible providers and keeps a provider change from becoming a data-model rewrite.
The mental model is small. Before: tenant-a/file.pdf is uploaded, a lifecycle rule is assumed, and nobody can prove which policy deleted it. After: an immutable artifact record says who owns the object, which policy version applies, when it expires, and what the last verification observed. The object is bytes. The record is control.
This is a policy decision.
What does tenant isolation actually protect?
In a training system, a document can contain product procedures, warehouse layouts, customer-service scripts, or internal pricing rules. A missing tenant check is therefore an authorization defect, even if the storage API returns a perfectly valid object. The first check is boring and decisive: derive the tenant from the authenticated server-side context, then compare it with the tenant recorded in the artifact request. Never accept a tenant identifier from a filename as proof of ownership.
A useful key is structured, but it is not a security boundary by itself. For example:
type ArtifactRecord = {
artifactId: string;
tenantId: string;
objectKey: string;
policyVersion: string;
retainUntil: string;
};
function objectKey(record: Pick<ArtifactRecord, "tenantId" | "artifactId">): string {
return `training/${record.tenantId}/${record.artifactId}`;
}
The service still needs a policy check before it reads, writes, lists, or deletes. Listing deserves special attention. A caller who cannot read another tenant's document should not be able to infer that tenant's filenames, counts, or training schedule from a broad prefix response. Make list scope explicit, and record denied requests as security events rather than hiding them in generic 403 metrics.
The retention design: four checks that survive provider changes
A reproducible retention policy needs four independent checks. They are intentionally redundant. Storage lifecycle configuration handles eventual object deletion; the application manifest explains why deletion is due; a verification job checks the observed state; and an audit event records the decision. If one layer changes, the others expose the mismatch.
- Ownership check. The artifact record has one tenant ID, and every object operation is authorized against it.
- Policy check. The record stores a policy version and an explicit expiration timestamp. Do not recalculate old dates from today's policy after a policy edit.
-
Execution check. A scheduled worker finds records past
retainUntil, requests deletion, and records the result. Repeating the request must be safe. - Verification check. A later read-after-delete probe confirms the expected state and raises an alert when the object remains visible or the record and object disagree.
This is where free tiers can mislead a design review. They may be useful for a sandbox, but the application still owns policy semantics, tenant authorization, and evidence. A storage lifecycle rule is an execution mechanism. It is not an audit trail.
The manifest can be written in ordinary application storage, provided its access policy is at least as strict as the object store's policy. A compact deletion worker might look like this:
type RetentionCandidate = {
artifactId: string;
tenantId: string;
objectKey: string;
retainUntil: string;
};
interface ObjectStore {
deleteObject(input: { key: string }): Promise<void>;
}
interface AuditLog {
write(event: {
type: "artifact.delete.requested";
artifactId: string;
tenantId: string;
objectKey: string;
}): Promise<void>;
}
async function expireArtifact(
candidate: RetentionCandidate,
now: Date,
store: ObjectStore,
audit: AuditLog,
): Promise<void> {
if (new Date(candidate.retainUntil) > now) return;
await store.deleteObject({ key: candidate.objectKey });
await audit.write({
type: "artifact.delete.requested",
artifactId: candidate.artifactId,
tenantId: candidate.tenantId,
objectKey: candidate.objectKey,
});
}
The important detail is not the interface name. It is the data passed to the audit record. A timestamp without tenant ID and object key leaves an operator guessing during an incident. An audit record without policy version leaves a compliance review guessing why the deletion was allowed.
How should I assess alternative storage providers with a free tier for user files?
Use one fixture set and one test harness. Put four artifacts in each test tenant: a small text document, a larger PDF, a duplicate content hash, and an object whose retention date is already due. Then test write, read, list, delete, retry, and cross-tenant denial. Keep the fixture names deliberately similar across tenants; accidental prefix assumptions surface quickly.
The comparison axis is behavior at the boundary. Amazon S3 documents lifecycle configuration and a broad object-storage API. Cloudflare R2 documents an S3-compatible API with Cloudflare-specific account and endpoint concepts. Backblaze B2 documents an S3-compatible API alongside its native API. Those are meaningful differences in integration surface, but none removes the need for an application-owned tenant check or retention manifest. The trade-off is clear: a familiar API can reduce adapter work, while provider-specific lifecycle and endpoint behavior still belongs in the test matrix.
A provider matrix should therefore contain questions such as:
| Check | Evidence to collect | Failure signal |
|---|---|---|
| Tenant isolation | Cross-tenant read and list tests | Any foreign key or metadata appears |
| Retention | Policy version plus delete verification | Expired record remains unexplained |
| Recovery | Restore test for a non-expired fixture | Restored bytes lack ownership metadata |
| Operations | Request IDs, status metrics, and audit events | A failed retry looks like success |
Run the matrix in CI against a local test double and in a staging account against each candidate. Do not let an API compatibility badge stand in for behavior compatibility. Pagination, conditional requests, metadata handling, deletion timing, and error classes are where migrations become real work.
Observability should make the decision visible. Emit counters for upload, authorized read, denied read, retention deletion, deletion retry, and verification mismatch. Add tenant ID only in a privacy-conscious form, such as a stable internal identifier with controlled access. A dashboard that shows total deletions but cannot separate tenants is not useful for this job.
Two objections worth answering
βWhat if the provider already offers lifecycle rules?β Use them. They are valuable infrastructure. Still keep the policy version and expiration in your manifest, because application records explain intent and lifecycle rules execute storage-side behavior. Reconcile both on a schedule. The rule can remove an object while the manifest remains; the manifest can expire while a rule is missing or delayed. Each mismatch deserves a defined state, not a silent cleanup. The limitation is that a lifecycle rule cannot explain the business reason for a tenant's retention date.
βWhy care about a free tier if the pilot is tiny?β Because a pilot creates habits. If the first implementation puts tenant identity only in a prefix, skips list authorization, and treats deletion as an unobservable background event, the production migration will preserve those assumptions. Use the free allocation for bounded test data, synthetic documents, and failure drills. Define the exit criteria before real user files arrive: isolation tests pass, expired artifacts are explainable, and a restore exercise produces an owned record.
The result is a storage choice you can defend without naming a winner. Providers differ in APIs, endpoints, lifecycle controls, and operational tooling. Your decision should rest on the same four checks for every candidate: ownership, policy, execution, and verification. That is the part that keeps e-commerce training artifacts reproducible when a tenant grows, a policy changes, or the storage endpoint changes.
References
- https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html
- https://developers.cloudflare.com/r2/api/s3/api/
- https://www.backblaze.com/docs/cloud-storage-s3-compatible-api
- https://www.rfc-editor.org/rfc/rfc9110
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.