# Reading files from the resource path

**URL:** <https://forum.datomic.com/t/reading-files-from-the-resource-path/868>\
**Category:** Datomic Applications\
**Created:** [March 3, 2019, 11:02pm UTC](https://forum.datomic.com/t/reading-files-from-the-resource-path/868 "2019-03-03T23:02:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hadils](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/hadils/32/270_2.png) [@hadils](https://forum.datomic.com/u/hadils)\
**Post date:** [March 3, 2019, 11:02pm UTC](https://forum.datomic.com/t/reading-files-from-the-resource-path/868/1 "2019-03-03T23:02:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hadils](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/hadils/32/270_2.png) [@hadils](https://forum.datomic.com/u/hadils)\
**Post date:** [March 4, 2019, 4:06pm UTC](https://forum.datomic.com/t/reading-files-from-the-resource-path/868/2 "2019-03-04T16:06:10Z")

</div>

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:

````auto
                "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
````

---

<div class="post-metadata">

**Author:** ![hadils](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/hadils/32/270_2.png) [@hadils](https://forum.datomic.com/u/hadils)\
**Post date:** [March 4, 2019, 5:41pm UTC](https://forum.datomic.com/t/reading-files-from-the-resource-path/868/3 "2019-03-04T17:41:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![marshall](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/marshall/32/48_2.png) [@marshall](https://forum.datomic.com/u/marshall)\
**Post date:** [March 4, 2019, 7:45pm UTC](https://forum.datomic.com/t/reading-files-from-the-resource-path/868/4 "2019-03-04T19:45:46Z")

</div>

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](https://docs.datomic.com/cloud/operation/access-control.html#authorize-ions)
