Sorry I misunderstood the question, I corrected the answer and this is my new answer: Accord the solutions of other providers you could use Cloud Run.

you only pay when your code is running, billed to the nearest 100 milliseconds, you could review it here