Reading files from the resource path


#1

I am a newbie with Datomic, but successfully got my Ion code to deploy and execute. I am trying to read json and edn files from the resource path, but I don’t know how to do it.

Thanks for any help with this,
Hadil


#2

Ok. I have created a workaround by putting my files up on S3. However, I am getting a compiler error accessing the S3 node during the push (I execute the S3 access to define a variable). The error message from the compiler is:

                "Message": "Cannot open <nil> as a Reader.",
                "At": [
                    "clojure.java.io$fn__11490",
                    "invokeStatic",
                    "io.clj",
                    288
                ]```
When I make it a function, it fails on the lambda call. Can I access S3 from the ion?

Thanks,
Hadil

#3

Fixed it by changing the permissions on the S3 bucket and files.


#4

Glad you got this sorted.
As you found, your Datomic instances and/or your S3 buckets/objects need to have the correct permissions.
More information on Datomic instance permissions can be found here: https://docs.datomic.com/cloud/operation/access-control.html#authorize-ions