You could put it in a lambda function.
The only downside is that it can get quite messy maintaining.
Could you elaborate on what part of the maintenance would be messy? I was under the impression that maintaining this would be quite easy because there is no physical server present anywhere in this setup.