@@ -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 ::
@@ -703,6 +704,32 @@ PHP process is terminated::
703
704
Zookeeper does not require a TTL as the nodes used for locking are ephemeral
704
705
and die when the PHP process is terminated.
705
706
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
+
706
733
Reliability
707
734
-----------
708
735
@@ -1054,3 +1081,4 @@ are still running.
1054
1081
.. _`readers-writer lock` : https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock
1055
1082
.. _`priority policy` : https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Priority_policies
1056
1083
.. _`PCNTL` : https://www.php.net/manual/book.pcntl.php
1084
+ .. _`DynamoDbClient` : https://async-aws.com/clients/dynamodb.html
0 commit comments