Multiple Runtimes?

I have several lambda functions that I’m trying to consolidate into a single serverless project. Some of the functions are written in python, and others are written in nodejs. Is there a way to define the runtime on a per-function basis to override the runtime defined in the provider section of the yaml? Below is what I’ve tried, but the resulting cloudformaiton template still uses “nodejs4.3”.


service: MultiRuntimeService

  name: aws
  runtime: nodejs4.3

    handler: jshandler.hello
    Runtime: nodejs4.3
    handler: pyhandler.hello
    Runtime: python2.7
1 Like

Hey @davidrdark at the moment this is not possible. Could you create an issue in our Github for it. Additionally you can work around it at the moment by overwriting the function through custom resources:

Basically those custom resources get merged on top of the functions we define from the config so you can overwrite things.

1 Like

Thanks for the response @flomotlik ! I’ll give that a try, then submit the issue for this feature.

I attempted to solve this with this PR. It seems to work for me. Let me know if it works for you. @davidrdark @flomotlik