Hi,
You can use Google Cloud Functions (somewhat similar to Amazon Lambda). Its currently in alpha but will soon be going beta and become available for everyone to use. I am currently using it, I have a cloud function written in node.js, listening to pub/sub topic. Whenever my device publishes an event, this function gets triggered. It basically reads the event data and saves it to Firebase real-time database. So far it has been running flawlessly. It is fully managed and can auto scale to handle any spikes.
Hope it solves your problem.
Thanks