PHPackages                             likeuntomurphy/serverless-ogm-bundle - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. likeuntomurphy/serverless-ogm-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

likeuntomurphy/serverless-ogm-bundle
====================================

Symfony bundle for the Serverless OGM

v0.1.0-alpha2(3mo ago)012↓93.8%MITPHPPHP &gt;=8.5CI passing

Since Apr 8Pushed 3mo agoCompare

[ Source](https://github.com/likeuntomurphy/serverless-ogm-bundle)[ Packagist](https://packagist.org/packages/likeuntomurphy/serverless-ogm-bundle)[ RSS](/packages/likeuntomurphy-serverless-ogm-bundle/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (10)Versions (2)Used By (0)

Serverless OGM Bundle
=====================

[](#serverless-ogm-bundle)

Symfony integration for the [Serverless OGM](https://github.com/likeuntomurphy/serverless-ogm). Registers the `DocumentManager`, discovers document classes automatically, and provides a DynamoDB profiler panel for the Symfony toolbar.

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

[](#installation)

```
composer require likeuntomurphy/serverless-ogm-bundle
```

Configuration
-------------

[](#configuration)

```
# config/packages/serverless_ogm.yaml
serverless_ogm: ~
```

The defaults connect to DynamoDB using the standard AWS credential chain (IAM role on Lambda, environment variables locally). Override for local development:

```
# config/packages/serverless_ogm.yaml
when@dev:
    serverless_ogm:
        dynamodb:
            endpoint: '%env(DYNAMODB_ENDPOINT)%'
            credentials:
                key: 'local'
                secret: 'local'
```

### Full configuration reference

[](#full-configuration-reference)

```
serverless_ogm:
    dynamodb:
        region: 'us-east-1'     # AWS region (default: us-east-1)
        endpoint: ~              # Override for DynamoDB Local
        credentials:
            key: ~               # Explicit access key (default: null, uses credential chain)
            secret: ~            # Explicit secret key
    table_suffix: ''             # Appended to all table names (e.g. '_test')
    default_billing_mode: 'PAY_PER_REQUEST'  # PAY_PER_REQUEST or PROVISIONED
    tables:                      # Per-table overrides (keyed by table name from #[Document])
        sessions:
            billing_mode: 'PROVISIONED'
            rcu: 10              # ReadCapacityUnits (default: 5)
            wcu: 5               # WriteCapacityUnits (default: 5)
```

Document discovery
------------------

[](#document-discovery)

The bundle uses Symfony 7.3+ [resource tags](https://symfony.com/blog/new-in-symfony-7-3-dependency-injection-improvements) to discover document classes. Any class with the `#[Document]` attribute is automatically registered with the `MetadataFactory` and excluded from the service container — no directory scanning, no explicit class lists.

```
use Likeuntomurphy\Serverless\OGM\Mapping\Document;
use Likeuntomurphy\Serverless\OGM\Mapping\Field;
use Likeuntomurphy\Serverless\OGM\Mapping\PartitionKey;

#[Document(table: 'users', pk: 'PK')]
class User
{
    #[PartitionKey]
    public string $email;

    #[Field]
    public string $name;
}
```

No further configuration needed. The class is discovered, mapped, and excluded from the container automatically.

Services
--------

[](#services)

The bundle registers the following services, all autowirable:

ServiceDescription`DocumentManager`The main persistence interface. Tagged with `kernel.reset` to clear the identity map between requests.`MetadataFactory`Holds metadata for all registered document classes.`DynamoDbClient`The AWS SDK client, configured from the bundle config.Table creation
--------------

[](#table-creation)

Create DynamoDB tables for all mapped documents:

```
php bin/console table:create
```

The command reads partition and sort key types from PHP property types (`string` maps to `S`, `int`/`float` to `N`). Billing mode defaults to `PAY_PER_REQUEST` (on-demand) and can be overridden globally via `default_billing_mode` or per table via the `tables` config. See [ProvisionedThroughput](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html) for details on provisioned capacity.

Profiler
--------

[](#profiler)

When the Symfony profiler is installed (`symfony/web-profiler-bundle`), the bundle adds a DynamoDB panel to the toolbar showing:

- **Operations** — every DynamoDB API call with operation name, table, and execution time
- **Identity map** — hit/miss counts showing how many `find()` calls were served from cache
- **Hydrations** — how many entities were hydrated from DynamoDB responses

The profiler hooks into the AWS SDK middleware stack and the OGM's `ProfilingLogger` interface. It is registered only when the profiler service is available — zero overhead in production.

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

[](#requirements)

- PHP &gt;= 8.5
- `likeuntomurphy/serverless-ogm` ^0.1
- `symfony/framework-bundle` ^8.0

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance82

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

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

90d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd90e82304f5690e9659448faac4dd0755f8b08600cda4a7691caacea1227831?d=identicon)[jc@jonathancox.dev](/maintainers/jc@jonathancox.dev)

---

Top Contributors

[![likeuntomurphy](https://avatars.githubusercontent.com/u/2012253?v=4)](https://github.com/likeuntomurphy "likeuntomurphy (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/likeuntomurphy-serverless-ogm-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/likeuntomurphy-serverless-ogm-bundle/health.svg)](https://phpackages.com/packages/likeuntomurphy-serverless-ogm-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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