Are serverless functions the proper way to query/update db with other devices?

I’m sorry if this is a completely daft question, but I’m trying to get my head around the following:

I’m migrating a Prisma 1 app to Prisma 2. In the Prisma 1 version I have some IoT devices (basically Raspberry Pis) using apolloFetch to query the Prisma server, but I’m not sure how I should go on with Redwood / Prisma 2.

I’m at a loss on how to go ahead with setting up the Raspberries and sending queries to the api.

If I read the docs correctly, serverless functions might be one way of doing this? Should I change my old apolloFetch queries to simple POST/GET queries (querying the deployed app url), and create functions in /api/src/functions/xxx to handle each query/update, or am I missing something completely?

Tbh, I might be severely overcomplicating things here. I’m still trying to get my head around serverless.

Cheers,
Aleksi