PHPackages                             mafordham/aws-s3 - 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. mafordham/aws-s3

ActiveLibrary

mafordham/aws-s3
================

A simple, bare-bones S3 helper class

v1.0.0(3mo ago)00MITPHP

Since Feb 7Pushed 3mo agoCompare

[ Source](https://github.com/mafordham/aws-s3)[ Packagist](https://packagist.org/packages/mafordham/aws-s3)[ RSS](/packages/mafordham-aws-s3/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

AwsS3
=====

[](#awss3)

A lightweight PHP class to interact directly with **Amazon S3**. No AWS SDK, no AWS CLI — just PHP communicating directly with the AWS REST API.

This class supports common S3 operations like uploading, downloading, listing, and deleting objects. It also supports Composer autoloading for easy integration into modern PHP projects.

Features
--------

[](#features)

- Direct communication with AWS S3 REST API
- No external libraries required (but supports Composer)
- Simple, easy-to-use methods
- Secure AWS request signing

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

[](#installation)

You can include the class manually:

```
require_once 'src/AwsS3.php';

Or use Composer autoloading by adding the src/ directory to your composer.json:

{
  "autoload": {
    "psr-4": {
      "MaFordham\\AwsS3\\": "src/"
    }
  }
}
```

Then run:

```
composer dump-autoload
```

and load the class using PSR-4 autoloading.

Configuration
=============

[](#configuration)

Create a new instance of AwsS3 with your AWS credentials and region:

```
use YourNamespace\\AwsS3\\AwsS3;

$s3 = new AwsS3([
    'access_key' => 'YOUR_AWS_ACCESS_KEY',
    'secret_key' => 'YOUR_AWS_SECRET_KEY',
    'region'     => 'us-east-1',
]);
```

- ⚠️ Keep your AWS credentials secure and never commit them to source control.

Usage
=====

[](#usage)

List Buckets
------------

[](#list-buckets)

```
$objects = $s3->objectsList();
print_r($objects);
```

Upload a File
-------------

[](#upload-a-file)

```
$s3->objectPut('my-bucket', '/remote/path/file.txt', 'image/png', base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO/tO7sAAAAASUVORK5CYII='));
```

Download a File
---------------

[](#download-a-file)

```
$s3->objectGet('my-bucket', '/remote/path/file.txt');
```

Delete an Object
----------------

[](#delete-an-object)

```
$s3->objectDelete('my-bucket', '/remote/path/file.txt');
```

Public URL for an Object
------------------------

[](#public-url-for-an-object)

```
$s3->objectUrl('my-bucket', '/remote/path/file.txt');
```

Security
--------

[](#security)

- Always store your AWS credentials securely
- Consider using environment variables or a .env file
- Do not commit secrets into the repository

Contributing
============

[](#contributing)

Pull requests and issues are welcome. Please follow the standard PR workflow.

License
=======

[](#license)

This project is licensed under the MIT License.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance81

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

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

Unknown

Total

1

Last Release

100d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f91e7b5773ff5fbfb3459250a73f783315d309e6dd88daa3d7934530de62d2b4?d=identicon)[mafordham](/maintainers/mafordham)

---

Top Contributors

[![mafordham](https://avatars.githubusercontent.com/u/99131308?v=4)](https://github.com/mafordham "mafordham (7 commits)")

### Embed Badge

![Health badge](/badges/mafordham-aws-s3/health.svg)

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

PHPackages © 2026

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