PHPackages                             mtrdesign/s3-logs-parser - 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. mtrdesign/s3-logs-parser

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

mtrdesign/s3-logs-parser
========================

S3 Logs Parser

1.0.4(4y ago)354672[3 PRs](https://github.com/mtrdesign/s3-logs-parser/pulls)MITPHPPHP ^7.4|^8.0

Since Jun 13Pushed 2y ago3 watchersCompare

[ Source](https://github.com/mtrdesign/s3-logs-parser)[ Packagist](https://packagist.org/packages/mtrdesign/s3-logs-parser)[ Docs](https://mtr-design.com)[ RSS](/packages/mtrdesign-s3-logs-parser/feed)WikiDiscussions master Synced 4w ago

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

AWS S3 Logs Parser
==================

[](#aws-s3-logs-parser)

[![Latest Stable Version](https://camo.githubusercontent.com/4d3bb6043623b58b8dd4644580ec14603eac3190516700a623ace807c027ab81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d747264657369676e2f73332d6c6f67732d7061727365722e737667)](https://packagist.org/packages/mtrdesign/s3-logs-parser)[![Total Downloads](https://camo.githubusercontent.com/4e056ab066add0dca6767e395f8ce09b575a68c3d62a9071ddf9502b021a62be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d747264657369676e2f73332d6c6f67732d7061727365722e737667)](https://packagist.org/packages/mtrdesign/s3-logs-parser)[![Build Status](https://camo.githubusercontent.com/0bd0c44b9e74b9ddfc5ba42ddf951110b522fa0570f8d2b57d3a064ecffc13d6/68747470733a2f2f7777772e7472617669732d63692e636f6d2f6d747264657369676e2f73332d6c6f67732d7061727365722e7376673f6272616e63683d6d6173746572)](https://www.travis-ci.com/mtrdesign/s3-logs-parser)[![codecov](https://camo.githubusercontent.com/18dc77d0edc82b13e8f9fec08ae7c3ea7cb3041066ad31b682b25ddcbfca3403/68747470733a2f2f636f6465636f762e696f2f67682f6d747264657369676e2f73332d6c6f67732d7061727365722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/mtrdesign/s3-logs-parser)[![StyleCI](https://camo.githubusercontent.com/a2a7299cf6eb623121e22e544baa09f22036340ef19376f17950b159868ab098/68747470733a2f2f7374796c6563692e696f2f7265706f732f3139313734343636392f736869656c643f7374796c653d666c61742d737175617265)](https://styleci.io/repos/191744669)[![PHPStan](https://camo.githubusercontent.com/93f48a32696722a9f89678a3cdaf1b135c158dfaff7b82d606f5b650a2606fa4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d3434434331312e7376673f6c6f6e6743616368653d74727565)](https://github.com/phpstan/phpstan)

AWS S3 Logs Parser is a simple [PHP](https://php.net/) package to parse [Amazon Simple Storage Service (Amazon S3)](https://aws.amazon.com/s3/) logs into a readable JSON format. The detailed usage report will show you how much times a file is downloaded and how much bytes are transferred.

- [Getting Started](#getting-started)
- [Usage](#usage)
- [Contributing](#contributing)
    - [Requirements](#requirements)
    - [Installation steps](#installation-steps)
- [License](#license)

Getting Started
---------------

[](#getting-started)

1. **Sign up for AWS** – Before you begin, you need to [sign up](https://docs.aws.amazon.com/AmazonS3/latest/gsg/SigningUpforS3.html) for an AWS account and retrieve your [AWS credentials](http://aws.amazon.com/developers/access-keys/).
2. **Create your own bucket** – Now that you've signed up for Amazon S3, you're ready to create a bucket using the [AWS Management Console](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html).
3. **Enable server access logging** – When you [enable logging](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/server-access-logging.html), Amazon S3 delivers access logs for a source bucket to a target bucket that you choose.
4. **Install the service** – Using [Composer](http://getcomposer.org/) is the recommended way to install it. The service is available via [Packagist](http://packagist.org/) under the [`mtrdesign/s3-logs-parser`](https://packagist.org/packages/mtrdesign/s3-logs-parser) package.

```
$ composer require mtrdesign/s3-logs-parser

```

Usage
-----

[](#usage)

Create a service instance:

```

```

Optionally, you can set and update service configurations via `setConfigs()` method:

```

```

Finally, you can get file's `download` and `bandwidth` statistics for a specific date in this way:

```

```

> It is recommended to pass [Carbon](https://carbon.nesbot.com/) date string to this method.

This is how service response should look like:

```
{
    "success":true,
    "statistics":{
        "bucket":"bn-test",
        "prefix":"bp-2018-10-31",
        "data":{
            "test.png":{
                "downloads":4,
                "bandwidth":4096
            },
            "test2.png":{
                "downloads":2,
                "bandwidth":2048
            }
        }
    }
}
```

Contributing
------------

[](#contributing)

Ensure all the guides are followed and style/test checkers pass before pushing your code.

### Requirements

[](#requirements)

- [Git](https://git-scm.com)
- [Docker](https://docker.com)
- [Docker Compose](https://docs.docker.com/compose)
- [GNU Make](https://www.gnu.org/software/make)

### Installation steps

[](#installation-steps)

1. Build the required services and Docker container with `$ make docker-build`
2. SSH into the container with `$ make docker-bash`
3. Confirm [code style checker](https://github.com/squizlabs/php_codesniffer) passes with `$ make run-phpcs`
4. Confirm [code quality checker](https://github.com/phpstan/phpstan) passes with `$ make run-phpstan`
5. Confirm [code texts checker](https://github.com/sebastianbergmann/phpunit) passes with `$ make run-phpunit`

License
-------

[](#license)

AWS S3 Logs Parser is open source and available under the [MIT License](LICENSE.md).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~214 days

Recently: every ~268 days

Total

6

Last Release

1539d ago

PHP version history (2 changes)1.0.0-beta1PHP ^7.1.8

1.0.3PHP ^7.4|^8.0

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/753a5486ac630699e27d9b2d196fb651db8940aab0899078edfba4b22ca5839c?d=identicon)[mtrdesign](/maintainers/mtrdesign)

---

Top Contributors

[![akolevutd](https://avatars.githubusercontent.com/u/7977543?v=4)](https://github.com/akolevutd "akolevutd (32 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

s3analyticslog parser

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mtrdesign-s3-logs-parser/health.svg)

```
[![Health](https://phpackages.com/badges/mtrdesign-s3-logs-parser/health.svg)](https://phpackages.com/packages/mtrdesign-s3-logs-parser)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k293.8M1.1k](/packages/league-flysystem-aws-s3-v3)[aws/aws-sdk-php-laravel

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

1.7k39.1M88](/packages/aws-aws-sdk-php-laravel)[kolay/xlsx-stream

Streaming XLSX reader and writer for PHP and Laravel. Constant memory regardless of file size, direct S3 multipart streaming, optional born-indexed random access.

4612.6k](/packages/kolay-xlsx-stream)[maxserv/fal_s3

Connect FAL/TYPO3 to any of the configured S3 buckets with a few clicks. File based configuration allows specific buckets depending on the context of your application.

1688.9k](/packages/maxserv-fal-s3)[matecat/simple-s3

Simple S3 Client

1319.7k](/packages/matecat-simple-s3)

PHPackages © 2026

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