@@ -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 ::
@@ -703,6 +704,32 @@ PHP process is terminated::
703704 Zookeeper does not require a TTL as the nodes used for locking are ephemeral
704705 and die when the PHP process is terminated.
705706
707+ .. _lock-store-dynamodb :
708+
709+ DynamoDbStore
710+ ~~~~~~~~~~~~~
711+
712+ The DynamoDbStore saves locks on a Amazon DynamoDB table. Install it by running:
713+
714+ .. code-block :: terminal
715+
716+ $ composer require symfony/amazon-dynamodb-lock
717+
718+ It requires a `DynamoDbClient `_ instance or a `Data Source Name (DSN) `_.
719+ This store does not support blocking, and expects a TTL to avoid stalled locks::
720+
721+ use Symfony\Component\Lock\Bridge\DynamoDb\Store\DynamoDbStore;
722+
723+ // a DynamoDbClient instance or DSN
724+ $dynamoDbClientOrDSN = 'dynamodb://default/lock';
725+ $store = new DynamoDbStore($dynamoDbClientOrDSN);
726+
727+ The table where values are stored is created automatically on the first call to
728+ the :method: `Symfony\\ Component\\ Lock\\ Bridge\\ DynamoDb\\ DynamoDbStore::save ` method.
729+ You can also create this table explicitly by calling the
730+ :method: `Symfony\\ Component\\ Lock\\ Bridge\\ DynamoDb\\ DynamoDbStore::createTable ` method in
731+ your code.
732+
706733Reliability
707734-----------
708735
@@ -1054,3 +1081,4 @@ are still running.
10541081.. _`readers-writer lock` : https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock
10551082.. _`priority policy` : https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Priority_policies
10561083.. _`PCNTL` : https://www.php.net/manual/book.pcntl.php
1084+ .. _`DynamoDbClient` : https://async-aws.com/clients/dynamodb.html
0 commit comments