PHPackages                             elecena/amazon-s3-php-class - 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. elecena/amazon-s3-php-class

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

elecena/amazon-s3-php-class
===========================

A standalone Amazon S3 (REST) client for PHP 7.3+ using CURL that does not require PEAR.

v1.4.0(1y ago)46.4k—0%4[1 issues](https://github.com/elecena/amazon-s3-php-class/issues)[1 PRs](https://github.com/elecena/amazon-s3-php-class/pulls)BSD-2-ClausePHPPHP &gt;=7.3CI passing

Since Oct 5Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/elecena/amazon-s3-php-class)[ Packagist](https://packagist.org/packages/elecena/amazon-s3-php-class)[ Docs](https://github.com/elecena/amazon-s3-php-class)[ RSS](/packages/elecena-amazon-s3-php-class/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (11)Used By (0)

Amazon S3 PHP Class
===================

[](#amazon-s3-php-class)

[![phpunit](https://github.com/elecena/amazon-s3-php-class/actions/workflows/phpunit.yml/badge.svg)](https://github.com/elecena/amazon-s3-php-class/actions/workflows/phpunit.yml)[![Coverage Status](https://camo.githubusercontent.com/d901169f03ba016424ff2f70c2e37bfd41208c7f9b5540a2a5bbb3c875aab813/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f656c6563656e612f616d617a6f6e2d73332d7068702d636c6173732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/elecena/amazon-s3-php-class?branch=master)

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

[](#installation)

```
composer require elecena/amazon-s3-php-class

```

Usage
-----

[](#usage)

OO method (e,g; $s3-&gt;getObject(...)):

```
$s3 = new S3($awsAccessKey, $awsSecretKey);
```

Statically (e,g; S3::getObject(...)):

```
S3::setAuth($awsAccessKey, $awsSecretKey);
```

### Object Operations

[](#object-operations)

#### Uploading objects

[](#uploading-objects)

Put an object from a file:

```
S3::putObject(S3::inputFile($file, false), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
```

Put an object from a string and set its Content-Type:

```
S3::putObject($string, $bucketName, $uploadName, S3::ACL_PUBLIC_READ, array(), array('Content-Type' => 'text/plain'))
```

Put an object from a resource (buffer/file size is required - note: the resource will be fclose()'d automatically):

```
S3::putObject(S3::inputResource(fopen($file, 'rb'), filesize($file)), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
```

#### Retrieving objects

[](#retrieving-objects)

Get an object:

```
S3::getObject($bucketName, $uploadName)
```

Save an object to file:

```
S3::getObject($bucketName, $uploadName, $saveName)
```

Save an object to a resource of any type:

```
S3::getObject($bucketName, $uploadName, fopen('savefile.txt', 'wb'))
```

#### Copying and deleting objects

[](#copying-and-deleting-objects)

Copy an object:

```
S3::copyObject($srcBucket, $srcName, $bucketName, $saveName, $metaHeaders = array(), $requestHeaders = array())
```

Delete an object:

```
S3::deleteObject($bucketName, $uploadName)
```

### Bucket Operations

[](#bucket-operations)

Get a list of buckets:

```
S3::listBuckets()  // Simple bucket list
S3::listBuckets(true)  // Detailed bucket list
```

Create a bucket:

```
S3::putBucket($bucketName)
```

Get the contents of a bucket:

```
S3::getBucket($bucketName)
```

Delete an empty bucket:

```
S3::deleteBucket($bucketName)
```

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance53

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 57.5% 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 ~570 days

Recently: every ~279 days

Total

8

Last Release

615d ago

Major Versions

v0.6.0 → v1.0.02021-08-20

PHP version history (2 changes)v0.5.0PHP &gt;=5.2.0

v1.0.0PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1929317?v=4)[Maciej Brencz](/maintainers/macbre)[@macbre](https://github.com/macbre)

---

Top Contributors

[![tpyo](https://avatars.githubusercontent.com/u/458777?v=4)](https://github.com/tpyo "tpyo (103 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (35 commits)")[![macbre](https://avatars.githubusercontent.com/u/1929317?v=4)](https://github.com/macbre "macbre (15 commits)")[![racklin](https://avatars.githubusercontent.com/u/21985?v=4)](https://github.com/racklin "racklin (6 commits)")[![vrana](https://avatars.githubusercontent.com/u/117453?v=4)](https://github.com/vrana "vrana (2 commits)")[![zyberspace](https://avatars.githubusercontent.com/u/2286104?v=4)](https://github.com/zyberspace "zyberspace (2 commits)")[![ptarjan](https://avatars.githubusercontent.com/u/40143?v=4)](https://github.com/ptarjan "ptarjan (2 commits)")[![gabrieljenik](https://avatars.githubusercontent.com/u/4942495?v=4)](https://github.com/gabrieljenik "gabrieljenik (2 commits)")[![clphillips](https://avatars.githubusercontent.com/u/682986?v=4)](https://github.com/clphillips "clphillips (2 commits)")[![tmuras](https://avatars.githubusercontent.com/u/695281?v=4)](https://github.com/tmuras "tmuras (1 commits)")[![lucatacconi](https://avatars.githubusercontent.com/u/9921890?v=4)](https://github.com/lucatacconi "lucatacconi (1 commits)")[![binki](https://avatars.githubusercontent.com/u/82626?v=4)](https://github.com/binki "binki (1 commits)")[![damac23](https://avatars.githubusercontent.com/u/959195?v=4)](https://github.com/damac23 "damac23 (1 commits)")[![daveajones](https://avatars.githubusercontent.com/u/1498236?v=4)](https://github.com/daveajones "daveajones (1 commits)")[![DropFan](https://avatars.githubusercontent.com/u/1765378?v=4)](https://github.com/DropFan "DropFan (1 commits)")[![ericnorris](https://avatars.githubusercontent.com/u/1906605?v=4)](https://github.com/ericnorris "ericnorris (1 commits)")[![ad-m](https://avatars.githubusercontent.com/u/3618479?v=4)](https://github.com/ad-m "ad-m (1 commits)")[![ricci69](https://avatars.githubusercontent.com/u/4765330?v=4)](https://github.com/ricci69 "ricci69 (1 commits)")[![stristr](https://avatars.githubusercontent.com/u/1203925?v=4)](https://github.com/stristr "stristr (1 commits)")

---

Tags

aws-clients3-clients3-storage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/elecena-amazon-s3-php-class/health.svg)

```
[![Health](https://phpackages.com/badges/elecena-amazon-s3-php-class/health.svg)](https://phpackages.com/packages/elecena-amazon-s3-php-class)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

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