# Is it not possible to deploy json files in netlify functions?

**URL:** <https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169>\
**Category:** Support\
**Tags:** lambda-functions\
**Created:** [October 13, 2019, 11:24pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169 "2019-10-13T23:24:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeffML](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jeffml/32/2662_2.png) [@JeffML](https://answers.netlify.com/u/JeffML)\
**Post date:** [October 13, 2019, 11:24pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169/1 "2019-10-13T23:24:39Z")

</div>

Google Firestore would like me to set up an env variable to point to a json file containing credentials. AFAICT, during deployment (netlify cli or via github push), json files in function folders get dropped.

I may be able to get around this using Google’s REST authorization API, but the env variable + JSON option is much cleaner.

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [October 14, 2019, 8:23pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169/2 "2019-10-14T20:23:50Z")

</div>

hi @JeffML ! Just making sure you were aware that the #opentalk category is a dedicated place for discussion and experiments - we don’t do support in this channel! If you need to move this, please go ahead and edit the category 🙂

---

<div class="post-metadata">

**Author:** ![JeffML](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jeffml/32/2662_2.png) [@JeffML](https://answers.netlify.com/u/JeffML)\
**Post date:** [October 14, 2019, 8:41pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169/3 "2019-10-14T20:41:19Z")

</div>

Thanks. I tried support, no response. That’s why I went here, hoping someone with experience using firestore via lambda functions would know what I need to know.

---

<div class="post-metadata">

**Author:** ![futuregerald](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/futuregerald/32/33_2.png) [@futuregerald](https://answers.netlify.com/u/futuregerald)\
**Post date:** [October 14, 2019, 8:55pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169/4 "2019-10-14T20:55:03Z")

</div>

Hi @JeffML, I’ve moved this over to the support category for you. We don’t drop files during deployment. You can zip your function along with a json file and use that. This is the same concept as zipping your function along with a `node_modules` and they are available to your function during runtime. There are also other methods people have used to get their google credentials into lambda functions, since it’s not just a Netlify issue. I don’t have a link handy but if you google search then you can find some answers.

---

<div class="post-metadata">

**Author:** ![JeffML](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jeffml/32/2662_2.png) [@JeffML](https://answers.netlify.com/u/JeffML)\
**Post date:** [October 14, 2019, 9:03pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169/5 "2019-10-14T21:03:47Z")

</div>

My (mis?) understanding is if I use Netlify Dev deployment, I don’t need to bundle or zip anything. Here’s the original issue(s):

> [@Firebase: include GOOGLE\_APPLICATION\_CREDENTIALS json file in bundle](https://answers.netlify.com/t/firebase-include-google-application-credentials-json-file-in-bundle/4054):
>
> Hello, I was getting a cryptic error when trying to bundle up the firebase code with netlify-lambda. That issue was fixed by following [these instructions](https://github.com/netlify/netlify-lambda/issues/112). With that problem solved, my next is to get the credentials loaded via the GOOGLE\_APPLICATION\_CREDENTIALS environment variable. I can add this to my environment in the Build & deploy settings in the Netflify project console: GOOGLE\_APPLICATION\_CREDENTIALS = "./mycreds-xxx.json" However, the json file is not included in functions-build. …

My next attempt is going to be to ditch netlify-lambda and webpack, shove the .json in my functions folder, change netlify.toml to point to the functions folder (instead of functions-build) and just deploy via Netlify Dev’s CLI. What could go wrong?

---

<div class="post-metadata">

**Author:** ![JeffML](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jeffml/32/2662_2.png) [@JeffML](https://answers.netlify.com/u/JeffML)\
**Post date:** [October 14, 2019, 11:00pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169/6 "2019-10-14T23:00:20Z")

</div>

@futuregerald,

I tried the simple folder approach (no netlify-lambda) and the [zip-it-and-ship-it](https://github.com/netlify/zip-it-and-ship-it) approach. Neither worked. Details [here](https://answers.netlify.com/t/firebase-include-google-application-credentials-json-file-in-bundle/4054/4).

Appreciate your help. I’m sure there’s a way forward somewhere.

– Jeff

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [October 16, 2019, 3:55pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169/7 "2019-10-16T15:55:20Z")

</div>

hey jeff, sorry to hear you are still struggling. We are going to take another look at that thread when we have a chance. I’m going to go ahead and close this one so we don’t lose track of things. 💪

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [October 16, 2019, 3:55pm UTC](https://answers.netlify.com/t/is-it-not-possible-to-deploy-json-files-in-netlify-functions/4169/8 "2019-10-16T15:55:24Z")

</div>

closed on October 16, 2019, 3:55pm UTC. Create a new topic for help! :)


