Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSON in Environmental Variable on Netlify

I am building an AWS Lambda function that uses ServiceAccountKey.json for Firebase authentication. When deploying to Netlify, I don't want to expose this data in the git repo. Is there a way I can save the whole JSON as an environmental variable?

JSON in environmental variable

Environmental variables on Netlify

like image 794
Robert Wolf Avatar asked Sep 20 '25 01:09

Robert Wolf


1 Answers

If I'm not wrong, you can store the json in the env var as a simple string. Otherwise have a look a jq which allows you to run to read a json from a file and directly store it in an env var.

Regards,

like image 129
tagkiller Avatar answered Sep 21 '25 23:09

tagkiller