PHPackages                             tourze/aws-s3-storage-bundle - 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. tourze/aws-s3-storage-bundle

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

tourze/aws-s3-storage-bundle
============================

Symfony bundle for AWS S3 file storage using async-aws/s3

0.0.3(7mo ago)00MITPHPCI passing

Since Nov 10Pushed 6mo agoCompare

[ Source](https://github.com/tourze/aws-s3-storage-bundle)[ Packagist](https://packagist.org/packages/tourze/aws-s3-storage-bundle)[ RSS](/packages/tourze-aws-s3-storage-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (24)Versions (4)Used By (0)

AWS S3 Storage Bundle
=====================

[](#aws-s3-storage-bundle)

[English](README.md) | [中文](README.zh-CN.md)

A Symfony bundle that provides AWS S3 file storage integration using `async-aws/s3` for the FileStorageBundle.

Features
--------

[](#features)

- Seamless integration with FileStorageBundle
- Uses async-aws/s3 for high-performance S3 operations
- Automatic fallback to local storage when S3 is not configured
- Support for custom S3-compatible endpoints (MinIO, etc.)
- Environment-based configuration
- Comprehensive test coverage

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

[](#installation)

```
composer require tourze/aws-s3-storage-bundle
```

Add the bundle to your `bundles.php`:

```
// config/bundles.php
return [
    // ... other bundles
    Tourze\AwsS3StorageBundle\AwsS3StorageBundle::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

Configure AWS S3 storage using environment variables:

```
# Required configuration
AWS_S3_BUCKET=your-bucket-name
AWS_S3_REGION=us-east-1

# Optional authentication (uses IAM roles if not provided)
AWS_S3_ACCESS_KEY_ID=your-access-key
AWS_S3_SECRET_ACCESS_KEY=your-secret-key

# Optional configuration
AWS_S3_PREFIX=uploads/                    # File path prefix
AWS_S3_ENDPOINT=https://s3.example.com    # Custom endpoint (for MinIO, etc.)
AWS_S3_USE_PATH_STYLE_ENDPOINT=true       # Use path-style URLs (required for MinIO)
```

### Environment Variables Reference

[](#environment-variables-reference)

VariableRequiredDescriptionDefault`AWS_S3_BUCKET`YesS3 bucket name-`AWS_S3_REGION`YesAWS region-`AWS_S3_ACCESS_KEY_ID`NoAccess key ID (uses IAM if not set)-`AWS_S3_SECRET_ACCESS_KEY`NoSecret access key-`AWS_S3_PREFIX`NoFile path prefix```AWS_S3_ENDPOINT`NoCustom S3 endpoint-`AWS_S3_USE_PATH_STYLE_ENDPOINT`NoUse path-style URLs`false`Usage
-----

[](#usage)

Once configured, the bundle automatically decorates the FileStorageBundle's filesystem factory. No additional code changes are required.

```
// FileStorageBundle will automatically use S3 when configured
$fileService->uploadFile($uploadedFile, $user);
```

MinIO Support
-------------

[](#minio-support)

For MinIO or other S3-compatible services:

```
AWS_S3_BUCKET=my-bucket
AWS_S3_REGION=us-east-1
AWS_S3_ACCESS_KEY_ID=minioaccesskey
AWS_S3_SECRET_ACCESS_KEY=miniosecretkey
AWS_S3_ENDPOINT=http://localhost:9000
AWS_S3_USE_PATH_STYLE_ENDPOINT=true
```

Automatic Fallback
------------------

[](#automatic-fallback)

The bundle automatically detects S3 configuration:

- **S3 configured**: Uses AWS S3 for file operations
- **S3 not configured**: Falls back to local file storage

This allows for seamless development and production deployment.

Testing
-------

[](#testing)

Run the test suite:

```
vendor/bin/phpunit
```

Architecture
------------

[](#architecture)

The bundle uses a decorator pattern to extend FileStorageBundle:

1. `FilesystemFactoryDecorator` checks for S3 configuration
2. If S3 is configured, creates an S3 filesystem using `async-aws/s3`
3. If not configured, delegates to the original filesystem factory

Requirements
------------

[](#requirements)

- PHP 8.2+
- Symfony 7.3+
- FileStorageBundle
- async-aws/s3 ^2.1
- league/flysystem ^3.10
- league/flysystem-async-aws-s3 ^3.10

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) file for details.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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 ~2 days

Total

3

Last Release

232d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13899502?v=4)[tourze](/maintainers/tourze)[@tourze](https://github.com/tourze)

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-aws-s3-storage-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-aws-s3-storage-bundle/health.svg)](https://phpackages.com/packages/tourze-aws-s3-storage-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)

PHPackages © 2026

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