remotion icon indicating copy to clipboard operation
remotion copied to clipboard

Automatic Removal of S3 Render Files

Open alimirjahani7 opened this issue 1 year ago • 0 comments

Feature Request 🛍️

Automatic Removal of S3 Render Files

Use Case

As renders create numerous files on S3, over time, these files can accumulate to terabytes in size, resulting in significant costs for Remotion users. It would be highly beneficial to have an automated mechanism to remove these files.

Possible Solution

One solution is to implement a lifecycle policy that expires files with a "renders/" prefix and are older than a specified number of days. This feature could be integrated into the remotion deploy site command, allowing users to set the number of days.

Here is the AWS documentation regarding lifecycle policies: Amazon S3 Lifecycle - Expiration Considerations

Another solution, suggested by @JonnyBurger, is to have per-render expiration. However, since S3 currently does not support per-object expiration, it would need to be managed within the renders themselves. One possibility is to create a lifecycle policy with a "render" prefix, but keep in mind that S3 supports only up to 1000 lifecycle policies.

alimirjahani7 avatar Jul 10 '23 16:07 alimirjahani7