I'm running into some issue in which I'm probably missing something very obvious. We have an EC2 instance running both the transactor and the peer process and are trying to setup DynamoDB as the storage mechanism. The instance has an instance profile that has access to the dynamo table called DatomicStorage. The transactor is able to start and write its address into the dynamo table with the following transactor properties:
protocol=ddb
aws-dynamodb-table=DatomicStorage
aws-transactor-role=IdentityInstanceRole
aws-dynamodb-region=us-east-1
host=localhost
port=4334
storage-admin-password=admin
storage-datomic-password=password
storage-access=remote
memory-index-threshold=32m
memory-index-max=256m
object-cache-max=128m
However, the peer process fails with the following exception
[ec2-user@ip-20-0-8-221 bin]$ clojure -Sdeps '{:deps {com.datomic/peer {:mvn/version "1.0.7364"} com.amazonaws/aws-java-sdk-dynamodb {:mvn/version "1.12.783"}}}'
Clojure 1.12.0
user=> (require '[datomic.api :as d]) (d/connect "datomic:")
SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See for further details.
nil
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
Execution error (AssertionError) at datomic.aws/credentials (aws.clj:37).
Assert failed: (and aws-access-key-id aws-secret-key)
Has anyone seen this error? I can't seem to find anything on the datomic forum.storage-admin-password and storage-datomic-password are not properties for dynamodb
(in transactor props)
similarly, user/password are not valid for the DDB uri on peers
you should be using an EC2 instance profile that grants reads to the ddb table, not static creds.
ddb peer role https://docs.datomic.com/operation/storage.html#peer-role unfortunately our docs do not say the peer URI on the same page. It's basically what you have written minus the entire ?query-string
oh, wow, the problem was indeed the <ddb://us-east-1/DatomicStorage/identity?user=admin&password=password|?user=admin&password=password> on the connection string. But the error message is confusing, saying that there is no aws-access-key and secret
it's a long story you don't want to know 🙂
similarly you should take the user/pass stuff out of the transactor props
🙂 thanks for helping out!
yeah, the user / pass stuff is due to migration from postgres to dynamo.