Object storage
Node.js and S3-compatible storage with the AWS SDK
The AWS SDK for JavaScript can target an S3-compatible service by supplying a custom endpoint and region. The data-path code can remain close to ordinary S3 code while project creation, quota and customer credential management stay in a separate provider control plane.
Build the client once from trusted configuration
Create an S3 client from environment or secret-manager values at application startup. Validate that endpoint and region are present so the SDK cannot silently infer an AWS destination.
Keep the secret key out of client-side browser JavaScript. Browser uploads should use a server-issued presigned URL or another delegated mechanism.
Use stable object keys
Generate application object identifiers and do not trust raw filenames to be globally unique bucket keys. Store the user-facing filename in metadata or a database when needed.
A stable key strategy simplifies retention, deletion and migration because application references do not depend on accidental path formatting.
Use multipart helpers for large uploads
The high-level upload helper can split large bodies and retry parts. Configure concurrency and part size around the application’s memory budget and network characteristics.
Handle cancellation so abandoned multipart uploads do not accumulate forever when a user closes a request halfway through.
Presign from the server
Generate short-lived upload or download URLs on an authenticated application endpoint. Limit the key and method to the operation the user is allowed to perform.
Log the application authorization decision without logging the complete signed URL, which can itself grant temporary access.
Write integration tests against the real endpoint
Mocks are useful for application logic but do not prove endpoint signing, TLS, policy or multipart compatibility. Maintain a small integration suite that runs against an isolated real test bucket before declaring a provider supported.
Delete the test objects by exact generated key so a failed test cannot turn cleanup into a broad production deletion.