@@ -399,6 +399,7 @@ Store Scope Blocking Ex
399399:ref: `RedisStore <lock-store-redis >` remote no yes yes yes
400400:ref: `SemaphoreStore <lock-store-semaphore >` local yes no no no
401401:ref: `ZookeeperStore <lock-store-zookeeper >` remote no no no no
402+ :ref: `DynamoDbStore <lock-store-dynamodb >` remote no yes no yes
402403========================================================== ====== ======== ======== ======= =============
403404
404405.. tip ::
@@ -695,6 +696,32 @@ PHP process is terminated::
695696 Zookeeper does not require a TTL as the nodes used for locking are ephemeral
696697 and die when the PHP process is terminated.
697698
699+ .. _lock-store-dynamodb :
700+
701+ DynamoDbStore
702+ ~~~~~~~~~~~~~
703+
704+ The DynamoDbStore saves locks on a Amazon DynamoDB table. Install it by running:
705+
706+ .. code-block :: terminal
707+
708+ $ composer require symfony/amazon-dynamodb-lock
709+
710+ It requires a `DynamoDbClient `_ instance or a `Data Source Name (DSN) `_.
711+ This store does not support blocking, and expects a TTL to avoid stalled locks::
712+
713+ use Symfony\Component\Lock\Bridge\DynamoDb\Store\DynamoDbStore;
714+
715+ // a DynamoDbClient instance or DSN
716+ $dynamoDbClientOrDSN = 'dynamodb://default/lock';
717+ $store = new DynamoDbStore($dynamoDbClientOrDSN);
718+
719+ The table where values are stored is created automatically on the first call to
720+ the :method: `Symfony\\ Component\\ Lock\\ Bridge\\ DynamoDb\\ DynamoDbStore::save ` method.
721+ You can also create this table explicitly by calling the
722+ :method: `Symfony\\ Component\\ Lock\\ Bridge\\ DynamoDb\\ DynamoDbStore::createTable ` method in
723+ your code.
724+
698725Reliability
699726-----------
700727
@@ -1046,3 +1073,4 @@ are still running.
10461073.. _`readers-writer lock` : https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock
10471074.. _`priority policy` : https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Priority_policies
10481075.. _`PCNTL` : https://www.php.net/manual/book.pcntl.php
1076+ .. _`DynamoDbClient` : https://async-aws.com/clients/dynamodb.html
0 commit comments