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