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 3w 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 41% 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

3092d 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://avatars.githubusercontent.com/u/7177165?v=4)[GBeushausen](/maintainers/GBeushausen)[@GBeushausen](https://github.com/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

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k285.7M1.0k](/packages/league-flysystem-aws-s3-v3)[baopham/dynamodb

Eloquent syntax for DynamoDB

4986.0M6](/packages/baopham-dynamodb)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

10.1k3.4k](/packages/leantime-leantime)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)

PHPackages © 2026

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