@@ -399,6 +399,7 @@ Store Scope Blocking Ex
399
399
:ref: `RedisStore <lock-store-redis >` remote no yes yes yes
400
400
:ref: `SemaphoreStore <lock-store-semaphore >` local yes no no no
401
401
:ref: `ZookeeperStore <lock-store-zookeeper >` remote no no no no
402
+ :ref: `DynamoDbStore <lock-store-dynamodb >` remote no yes no yes
402
403
========================================================== ====== ======== ======== ======= =============
403
404
404
405
.. tip ::
@@ -695,6 +696,32 @@ PHP process is terminated::
695
696
Zookeeper does not require a TTL as the nodes used for locking are ephemeral
696
697
and die when the PHP process is terminated.
697
698
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
+
698
725
Reliability
699
726
-----------
700
727
@@ -1046,3 +1073,4 @@ are still running.
1046
1073
.. _`readers-writer lock` : https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock
1047
1074
.. _`priority policy` : https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Priority_policies
1048
1075
.. _`PCNTL` : https://www.php.net/manual/book.pcntl.php
1076
+ .. _`DynamoDbClient` : https://async-aws.com/clients/dynamodb.html
0 commit comments