Short answer: make the export job tenant-owned before generating any CSV, write the completed bytes to a private S3-compatible object, and mint a short-lived signed download link only after the ownership check and upload both succeed.
The important design decision is not which SDK creates the link. It is where tenant identity remains attached to the work. In an edtech application, one instructor's class report must not become readable by another instructor because a job ID or object key was guessed. The browser should receive a temporary capability for one already-authorized object, never a storage credential and never a path that the browser can reinterpret.
This is a small pipeline. Treat it like a serious one.
The authorization failure happens before storage
Start with an application record such as export_jobs . It should contain the tenant ID, requesting user ID, export status, a stable job ID, and the object key once that key has been chosen.…