Running balena node-sdk in serverless lambda function

I’m attempting to build a web application at consumes the balena api, however it seems the SDK assumes it has write access to the disk.
Is there a way to disable writing to disk?

2020-03-21T14:56:45.323Z	undefined	ERROR	Error: ENOENT: no such file or directory, mkdir '/home/sbx_user1051/.balena'
    at Object.mkdirSync (fs.js:823:3)
    at LocalStorage._init (/var/task/node_modules/node-localstorage/LocalStorage.js:156:14)
    at new LocalStorage (/var/task/node_modules/node-localstorage/LocalStorage.js:121:12)
    at createStorage (/var/task/node_modules/balena-settings-storage/build/local-storage.js:97:16)
    at getStorage (/var/task/node_modules/balena-settings-storage/build/storage.js:39:24)
    at new BalenaAuth (/var/task/node_modules/balena-auth/build/auth.js:191:24)
    at getSdk (/var/task/node_modules/balena-sdk/build/balena.js:102:10)
    at Object.<anonymous> (/var/task/api/_setup.js:2:23)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/var/task/api/device/index.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:955:30) {
  errno: -2,
  syscall: 'mkdir',
  code: 'ENOENT',
  path: '/home/sbx_user1051/.balena'
RequestId: 3341e0b6-3e99-4faf-91cb-d4083f2dfa39 Error: Runtime exited with error: exit status 1

Hi there, unfortunately as things stand now you cannot disable it, as we need to store the token persistently somehow. It would be an option to also store it in memory I guess, but we currently don’t support that. Isn’t it possible to enable write access to some directory, and then pass that path as the storage directory to the SDK? See here for more info: