PHPackages                             michaeltlee/s3-bucket-stream-zip-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. michaeltlee/s3-bucket-stream-zip-php

ActiveLibrary[File &amp; Storage](/categories/file-storage)

michaeltlee/s3-bucket-stream-zip-php
====================================

PHP library to efficiently stream contents from an AWS S3 bucket or folder as a zip file

v4.0.0(9y ago)318.5k↓32%1MITPHPPHP &gt;=5.3.3

Since Mar 6Pushed 9y agoCompare

[ Source](https://github.com/Michaeltlee/s3-bucket-stream-zip-php)[ Packagist](https://packagist.org/packages/michaeltlee/s3-bucket-stream-zip-php)[ Docs](https://github.com/michaeltlee/s3-bucket-stream-zip-php)[ RSS](/packages/michaeltlee-s3-bucket-stream-zip-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

S3BucketStreamZip
=================

[](#s3bucketstreamzip)

Forked from `jmathai/s3-bucket-stream-zip-php`

Overview
--------

[](#overview)

This library lets you efficiently stream the contents of an S3 bucket/folder as a zip file to the client.

Uses v3 of AWS SDK to stream files directly from S3.

Installation
------------

[](#installation)

Installation is done via composer by adding the a dependency on .

```
composer require michaeltlee/s3-bucket-stream-zip-php

```

Usage
-----

[](#usage)

```
// taken from examples/simple.php
// since large buckets may take lots of time we remove any time limits
set_time_limit(0);
require sprintf('%s/../vendor/autoload.php', __DIR__);

use Aws\S3\Exception\S3Exception;
use MTL\S3BucketStreamZip\Exception\InvalidParameterException;
use MTL\S3BucketStreamZip\S3BucketStreamZip;

$auth = [
    'key'     => '*****',
    'secret'  => '*****',
    'region'  => 'us-east-1', // optional. defaults to us-east-1
    'version' => 'latest' // optional. defaults to latest
];

$stream = new S3BucketStreamZip($auth);

try {
    $stream->bucket('testbucket')
           ->prefix('testfolder') // prefix method adds a trailing '/'
           ->send('name-of-zipfile-to-send.zip');
} catch (InvalidParameterException $e) {
    // handle the exception
    echo $e->getMessage();
} catch (S3Exception $e) {
    // handle the exception
    echo $e->getMessage();
}
```

```
$stream->bucket('another-test-bucket')
       ->prefix('test/')
       ->addParams([
           'MaxKeys' => 1, // array of other parameters
       ])
       ->send('zipfile-to-send.zip');
```

```
// if prefix is not supplied, entire bucket contents are streamed
$stream->bucket('another-test-bucket')
       ->send('zipfile-to-send.zip');
```

Laravel 5.4
-----------

[](#laravel-54)

- `pa make:provider AWSZipStreamServiceProvider` and copy the contents `examples/AwsZipStreamServiceProvider.php`.
- Make sure your config values are all set.
- Register the provider in `config/app.php`.

### OR in `config/app.php`

[](#or-in-configappphp)

```
'providers' => [
    ...
    MTL\S3BucketStreamZip\AWSZipStreamServiceProvider::class,
    ...
]
```

in `config/services.php`, set:

```
's3' => [
    'key'     => '',
    'secret'  => '',
    'region'  => '',
    'version' => '',
];
```

Authors
-------

[](#authors)

- Jaisen Mathai  -

Dependencies
------------

[](#dependencies)

- Paul Duncan  -
- Jonatan Männchen  -
- Jesse G. Donat  -

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~184 days

Total

5

Last Release

3347d ago

Major Versions

1.0.1 → v2.0.02017-02-28

v2.0.0 → v3.0.02017-03-09

v3.0.0 → v4.0.02017-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/10d3a7c62ce70ce3778e6cc9e184f9e760fca79bc24d529deaf6c94ae740599a?d=identicon)[mtl](/maintainers/mtl)

---

Top Contributors

[![jmathai](https://avatars.githubusercontent.com/u/6384?v=4)](https://github.com/jmathai "jmathai (20 commits)")

---

Tags

streamphpamazons3awszipdownload

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michaeltlee-s3-bucket-stream-zip-php/health.svg)

```
[![Health](https://phpackages.com/badges/michaeltlee-s3-bucket-stream-zip-php/health.svg)](https://phpackages.com/packages/michaeltlee-s3-bucket-stream-zip-php)
```

###  Alternatives

[jmathai/s3-bucket-stream-zip-php

PHP library to efficiently stream contents from an AWS S3 bucket or folder as a zip file

56114.4k](/packages/jmathai-s3-bucket-stream-zip-php)[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[eddturtle/direct-upload

Composer Package to build an AWS Signature ready to Direct Upload to S3

88728.1k2](/packages/eddturtle-direct-upload)[vinelab/cdn

Content Delivery Network (CDN) Package for Laravel

217240.8k1](/packages/vinelab-cdn)[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

15430.4k2](/packages/fedemotta-yii2-aws-sdk)[platinumpixs/aws-symfony2-bundle

A simple Symfony 2 bundle for including the AWS SDK for PHP.

1274.3k1](/packages/platinumpixs-aws-symfony2-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
