There is more than one way to zip files stored in S3. The right choice depends on how much control you need versus how much infrastructure you want to own. Here is an honest comparison of the three common options.
| S3zipper (API) | AWS Lambda | EC2 worker | |
|---|---|---|---|
| Setup | Sign up, get a key | Write and deploy code | Provision and manage a server |
| Code you maintain | None | The zip logic, packaging, timeouts | Zip logic plus the instance itself |
| Practical limits | Plan-based size limits | 15-minute timeout, limited /tmp | Whatever you provision |
| Scaling | Handled by the service | Concurrency limits and cold starts | Manual or autoscaling groups |
| Cost model | Per-plan subscription | Per request and compute time | Per hour, whether busy or idle |
| Output | Archive in your bucket + signed URL | Archive you upload yourself | Archive you upload yourself |
| Best for | Apps that zip on demand | Small jobs / existing AWS-heavy stacks | Heavy custom pipelines |
When Lambda is the right answer
If your zips are small and infrequent, and you already run everything on AWS, a Lambda function is cheap and self-contained. The friction appears when archives grow: the 15-minute limit and temporary storage force you to split work, and you now own streamed zip logic, chunking and error handling.
When an EC2 worker is the right answer
Heavy, custom processing — transforming files, joining with other systems, long-running batches — justifies a worker you control. The cost is operational: patching, monitoring, and paying for capacity you may not use.
When the API approach fits
If the requirement is simply "give me a zip of these files, right now", the API removes the infrastructure entirely. You send the file list, poll a task id, and receive a signed link. Your application code stays small, and there is no worker to babysit when nothing is running.
Can they be combined?
Yes — a common pattern is to use the API for ad-hoc and user-facing zips, while keeping a Lambda or worker for scheduled internal batch jobs. There is no lock-in in the output: the archive is a normal object in your bucket.
If you want to try the API route, the end-to-end guide takes about five minutes.