One service multiple functions multiple runtimes

Since the runtime is defined at the provider level, all functions must be written for the same runtime. How can you define one service with multiple functions with different runtimes? for example one function runs on nodejs and one on python

1 Like

You can’t. But…
You could define multiple services (ie. multiple projects with their own serverless.yml) each using whatever runtime you like, then map them all to the same domain using the APIG Custom Domain feature.

See this Tutorial for some tips.

Checkout this example. It does exactly what you’re looking for, 1 serverless.yml, 2 functions, 2 runtimes.

1 Like