PHPackages                             gbeushausen/silex-dynamodb-session-provider - 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. [Database &amp; ORM](/categories/database)
4. /
5. gbeushausen/silex-dynamodb-session-provider

ActiveLibrary[Database &amp; ORM](/categories/database)

gbeushausen/silex-dynamodb-session-provider
===========================================

Amazon DynamoDB session provider for Silex 2.x

2.0.1(8y ago)018MITPHPPHP &gt;=5.5.9

Since Sep 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/GBeushausen/Silex-DynamoDb-Session-Provider)[ Packagist](https://packagist.org/packages/gbeushausen/silex-dynamodb-session-provider)[ RSS](/packages/gbeushausen-silex-dynamodb-session-provider/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Silex-DynamoDb-Session-Provider
===============================

[](#silex-dynamodb-session-provider)

Provides support in Silex 2.x projects for sessions that are stored on Amazon DynamoDB.

Typically PHP Sessions are not scalable. As soon as a load balanced / multi server setup is involved, one needs to find a better solution. Amazons DynamoDB NoSQL storage engine is the fast, easy and scalable solution for that problem.

Just implement it in your project ( see below ). You also need a solution to get rid of stale sessions from the table. Since deleting many old sessions can take a lot of write capacity units, it's best to configure a cron job and run the Garbage Collector over night.

Gunnar Beushausen

Basic Usage
-----------

[](#basic-usage)

```
use Silex\Provider\SessionServiceProvider;
use DynamoDbSession\DynamoDbSessionServiceProvider;

//Don't keep your AWS credentials in your source code! Put it in an environment variable,
//or if you're hosting on EC2, use IAM Roles!

$this->application['AwsSdk'] = function() {
	return new Sdk([
		'region'   => 'eu-west-1', // EU West (Ireland) Region
		'version'  => 'latest'  // Use the latest version of the AWS SDK for PHP
	]);
};

$app['session.storage.options'] = [
  'cookie_httponly' => true,
  'hash_function' => 'sha256',
  'hash_bits_per_character' => 6,
];

$app['session.dynamodb.options'] = [
  'table_name' => 'sessions',
];

$app->register(new SessionServiceProvider());
$app->register(new DynamoDbSessionServiceProvider());

//To run the Garbage Collector in order to remove stale and old sessions from the table, run the following code:
$app['session.dynamodb.garbagecollect'];

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~792 days

Total

3

Last Release

3046d ago

Major Versions

1.0 → 2.02018-01-13

PHP version history (2 changes)1.0PHP &gt;=5.3.2

2.0PHP &gt;=5.5.9

### Community

Maintainers

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

---

Top Contributors

[![datibbaw](https://avatars.githubusercontent.com/u/87972?v=4)](https://github.com/datibbaw "datibbaw (4 commits)")[![GBeushausen](https://avatars.githubusercontent.com/u/7177165?v=4)](https://github.com/GBeushausen "GBeushausen (2 commits)")

### Embed Badge

![Health badge](/badges/gbeushausen-silex-dynamodb-session-provider/health.svg)

```
[![Health](https://phpackages.com/badges/gbeushausen-silex-dynamodb-session-provider/health.svg)](https://phpackages.com/packages/gbeushausen-silex-dynamodb-session-provider)
```

###  Alternatives

[baopham/dynamodb

Eloquent syntax for DynamoDB

4975.7M6](/packages/baopham-dynamodb)[kitar/laravel-dynamodb

A DynamoDB based Eloquent model and Query builder for Laravel.

193675.3k1](/packages/kitar-laravel-dynamodb)[kettle/dynamodb-orm

A lightweight object-dynamodb mapper for PHP

49210.0k](/packages/kettle-dynamodb-orm)[swiftotter/driver

A database task-runner that helps you to turn production database into a staging/development database sandbox

6111.1k2](/packages/swiftotter-driver)[urbanindo/yii2-dynamodb

DynamoDB extensions for Yii2

1471.4k](/packages/urbanindo-yii2-dynamodb)[oryxcloud/laravel-dynamodb-session-driver

DynamoDB Session Driver for Laravel 5

1460.8k](/packages/oryxcloud-laravel-dynamodb-session-driver)

PHPackages © 2026

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