Private Image Storage: Signed URLs and Retention
Explore how to design secure private image storage using short-lived signed URLs, strict retention policies, and cost-effective object-store trade-offs.

Stock photo for illustration only, not from the actual event
- Keep storage buckets private and protect files with short-lived, authorized signed URLs.
- Base cost analysis on stored bytes, request operations, and egress traffic rather than metadata.
- Maintain a detailed ledger to track object scopes, legal holds, and precise deletion deadlines.
- Implement an idempotent deletion queue with a dedicated background worker.
In property-management applications, generated assets like lease scans, inspection photos, and renovation mockups are easy to create but surprisingly difficult to retire. These files often carry contractual deletion deadlines. The total cost encompasses stored bytes, request operations, and delivery egress, with retention duration and egress typically dominating the budget for smaller systems.
Beginning with a ledger rather than a generic vendor calculator provides clearer insights. Tracking tenant scope, creation time, legal hold status, deletion deadline, size, and download counts allows engineering teams to identify exact cost drivers. If images are viewed infrequently, reducing the retention window yields far better financial results than optimizing request counts.

Stock photo for illustration only, not from the actual event
The request architecture requires strict sequencing: authenticate the user, authorize property access, mint an expiring URL, and stream the bytes while keeping the underlying storage bucket completely private. A URL functions strictly as a delivery capability rather than an access control database.
"The cheapest design is the one that deletes the right bytes on time; a low storage rate does not rescue a retention process that cannot prove what it removed."
Dev.to
Implementing strict signed URL policies and automated retention lifecycles mitigates critical security vulnerabilities such as credential leaks in request logs and unauthorized data access, establishing a robust compliance framework for sensitive user files.
Proper deletion management requires an active queue rather than passive daily scans to eliminate windows of exposure after deadlines pass. Engineers must also guard against authorization gaps, referrer leakage, clock skew issues, and race conditions between ongoing downloads and scheduled deletions.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment