Howdy all.
I'm testing setting up Datomic Cloud using an IntelliJ IDE. I'm following the Client API tut from Datomic but am stuck initializing the client.
The spec from an API client is here, and the tut is here, under the step Using Datomic Cloud.
So the tut says to init a client like so:
(require '[datomic.client.api :as d])
(def cfg {:server-type :ion
:region "<your AWS Region>" ;; e.g. us-east-1
:system "<system name>"
:creds-profile "<your_aws_profile_if_not_using_the_default>"
:endpoint "<your endpoint>"})
They say to include an AWS profile if not using the default. I am using the default as far as I know--I'm not part of an org in AWS.
This is the (partially redacted) code from my tutorial.core namespace, where I'm trying to init Datomic:
(ns tutorial.core
(:gen-class))
(require '[datomic.client.api :as d])
(def cfg {:server-type :cloud
:region "us-east-2"
:system "roam"
:endpoint "https://API_ID.execute-api.us-east-2.amazonaws.com"
})
(def client (d/client cfg))
(d/create-database client {:db-name "blocks"})
(d/connect client {:db-name "blocks"})
However, I'm getting an error from Datomic like: Forbidden to read keyfile at s3://URL/roam/datomic/access/admin/.keys. Make sure that your endpoint is correct, and that your ambient AWS credentials allow you to GetObject on the keyfile.
Do I need some sort of credential? Could anything else be causing this error? I got the endpoint URL from the ClientApiGatewayEndpoint in my CloudFormation Datomic stack.
Please let me know if I should provide more info! Thanks.