PHPackages                             silverstripe/dynamodb - 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. silverstripe/dynamodb

ActiveSilverstripe-vendormodule

silverstripe/dynamodb
=====================

SilverStripe DynamoDB integration.

6.0.0(1y ago)4375.1k↓18.6%14[2 issues](https://github.com/silverstripe/silverstripe-dynamodb/issues)6BSD-3-ClausePHPCI passing

Since Jul 2Pushed 9mo ago10 watchersCompare

[ Source](https://github.com/silverstripe/silverstripe-dynamodb)[ Packagist](https://packagist.org/packages/silverstripe/dynamodb)[ RSS](/packages/silverstripe-dynamodb/feed)WikiDiscussions 6 Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (30)Used By (6)

SilverStripe DynamoDB
=====================

[](#silverstripe-dynamodb)

[![CI](https://github.com/silverstripe/silverstripe-dynamodb/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-dynamodb/actions/workflows/ci.yml)

This module enables storing SilverStripe sessions in DynamoDB.

Requirements
------------

[](#requirements)

- SilverStripe 5.0+
- PHP 8.1+

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

[](#installation)

Add these custom repositories to your composer.json

```
composer require silverstripe/dynamodb
```

Sessions with DynamoDB
----------------------

[](#sessions-with-dynamodb)

If you wish to store sessions in DynamoDB, set the required environment variables in `.env`:

```
# The name of the DynamoDB table to store sessions in
AWS_DYNAMODB_SESSION_TABLE=mysession

# The region that the DynamoDB table will live in (in this example here it uses Sydney)
AWS_REGION_NAME=ap-southeast-2
```

Once these are in place, this module will configure DynamoDB and register that as the session handler.

Before you can actually use this, you need to create a table in which to store the sessions. Follow the instructions in the [AWS SDK for PHP documentation](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/service_dynamodb-session-handler.html#basic-usage).

**IMPORTANT: You need to [set up a TTL attribute](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/service_dynamodb-session-handler.html#ddbsh-garbage-collection) for garbage collection in your table. The module does not provide automated garbage collection abilities.**

Using DynamoDB outside of AWS
-----------------------------

[](#using-dynamodb-outside-of-aws)

Sometimes you'll want to test that DynamoDB sessions work on your local development environment. You can make that happen by defining `AWS_ACCESS_KEY` and `AWS_SECRET_KEY`. Please don't define these constants in the environment file in EC2 instances, as credentials are automatically handled by the IAM role inside of AWS.

```
# The AWS access key and secret. This is optional if you've configured an instance with an IAM role
# https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html
# Note that AWS_ACCESS_KEY can only contain alphanumeric characters
# https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html#DynamoDBLocal.DownloadingAndRunning.title
AWS_ACCESS_KEY=myaccesskey
AWS_SECRET_KEY=mysecret
```

Local Testing
-------------

[](#local-testing)

You can simulate DynamoDB locally for easier development through [DynamoDB Local](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SettingUp.html).

Set environment constants. Note that actual access keys and regions are ignored, they just need to be defined.

```
AWS_DYNAMODB_SESSION_TABLE=mysession
AWS_ACCESS_KEY=myaccesskey
AWS_SECRET_KEY=mysecret
AWS_DYNAMODB_ENDPOINT=http://localhost:8000
AWS_REGION_NAME=ap-southeast-2
```

Download [DynamoDB Local](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SettingUp.html)and start it - it'll be available under `http://localhost:8000`.

Now use the [AWS CLI Tools](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html)to interact with your local DynamoDB.

Configure user (optional):

You can configure a user to use with the AWS CLI tools. Use this if you are having issues with the environment variables being picked up.

```
aws configure set aws_access_key_id myaccesskey
aws configure set aws_secret_access_key myaccesskey
aws configure set default.region ap-southeast-2
```

Create table:

```
aws dynamodb create-table --table-name mysession --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 --endpoint-url http://localhost:8000
```

List tables:

```
aws dynamodb list-tables --endpoint-url http://localhost:8000
```

List all sessions:

```
aws dynamodb scan --table-name mysession --endpoint-url http://localhost:8000
```

Delete all sessions (use create table to reset afterwards):

```
aws dynamodb delete-table --table-name mysession --endpoint-url http://localhost:8000
```

Contribute
----------

[](#contribute)

Do you want to contribute? Great, please see the [CONTRIBUTING.md](CONTRIBUTING.md)guide.

License
-------

[](#license)

This module is released under the BSD 3-Clause License, see [license.md](license.md).

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance43

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~132 days

Recently: every ~30 days

Total

29

Last Release

284d ago

Major Versions

2.x-dev → 4.0.02017-06-14

3.0.x-dev → 4.0.12017-11-20

4.1.0 → 5.0.0-beta12023-02-13

5.0.1 → 6.0.0-alpha12024-09-18

5.x-dev → 6.0.02025-05-07

### Community

Maintainers

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

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

![](https://www.gravatar.com/avatar/afbb3dcc9ef29c1a6eedd6addcae5fce9ab1271915a85a4c349301b71237368d?d=identicon)[silverstripe-machine01](/maintainers/silverstripe-machine01)

---

Top Contributors

[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (24 commits)")[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (16 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (15 commits)")[![dhensby](https://avatars.githubusercontent.com/u/563596?v=4)](https://github.com/dhensby "dhensby (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (13 commits)")[![dnsl48](https://avatars.githubusercontent.com/u/9313746?v=4)](https://github.com/dnsl48 "dnsl48 (5 commits)")[![andrewandante](https://avatars.githubusercontent.com/u/9702648?v=4)](https://github.com/andrewandante "andrewandante (2 commits)")[![mateusz](https://avatars.githubusercontent.com/u/118653?v=4)](https://github.com/mateusz "mateusz (1 commits)")[![micmania1](https://avatars.githubusercontent.com/u/881537?v=4)](https://github.com/micmania1 "micmania1 (1 commits)")[![sabina-talipova](https://avatars.githubusercontent.com/u/87288324?v=4)](https://github.com/sabina-talipova "sabina-talipova (1 commits)")

---

Tags

hacktoberfestawsdynamodbsilverstripe

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/silverstripe-dynamodb/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripe-dynamodb/health.svg)](https://phpackages.com/packages/silverstripe-dynamodb)
```

###  Alternatives

[aws/aws-sdk-php-laravel

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

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[kettle/dynamodb-orm

A lightweight object-dynamodb mapper for PHP

49210.0k](/packages/kettle-dynamodb-orm)[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

15430.4k2](/packages/fedemotta-yii2-aws-sdk)[gmo/credstash

A utility for managing secrets in the cloud using AWS KMS and DynamoDB

20159.3k](/packages/gmo-credstash)[gwk/dynamo-session-bundle

DynamoDB Session Handler Bundle for Symfony 2

14210.9k](/packages/gwk-dynamo-session-bundle)[riverline/dynamodb

Amazon WebService DynamoDB PHP object wrapper

3339.2k](/packages/riverline-dynamodb)

PHPackages © 2026

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