I have static site on Render and would like to make a call to a 3rd party API without exposing my API key on the frontend.
For this I thought a solution could be a "Function as a Service".
The function code is stored within the same repo as my static site in a designated folder and each function in that folder gets turned into an endpoint that can be called by the static site only.
This way the function (running on whatever host it is) makes the API call and the call cannot be inspected like you could inspect a frontend API call with the browser developer tools.
I assume there would be a cost to this, but my hope was that it would be less than deploying a full >=$7 service as the call is made infrequently and is quick to run (hence FaaS over a full service).