-
-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: found unsupported runtime 'provided' #570
Comments
Which serverless and serverless-offline version are you using ? Try v3.33.0 |
Also check your serverless.yml file for typos :) |
Using Serverless 1.36.0 and serverless-offline 3.32.2. Response is like:
|
What about your serverless.yml file ? |
As the blog post describes (so that I can specify NodeJS 10), the
|
I see. The plugin does not support a provided runtime yet. But I'm confident it will in the future. Thank you for your issue. |
@dherault if you are using a custom runtime, in my case PHP, though a Lambda layer providing the binary and boostrap file, is it possible to make use of this plugin to emulate api gateway and lambda up to the point where the binary is executed? The custom binary has been setup in a similar way to https://aws.amazon.com/blogs/apn/aws-lambda-custom-runtime-for-php-a-practical-example/ but with all layers configured inside the serverless.yml. ( |
@BenEllerby I'm sorry but the plugin can't do that. It looks like serverless-offline will not handle provided runtimes until serverless can invoke them. |
OK @dherault thanks for the help 👍 |
@awhitford just had the same problem. as an interim, you can use serverless variables, e.g. provider:
runtime: ${self:custom.runtime.${env:NODE_ENV}} # or ${opt:stage} alternatively
custom:
runtime:
localhost: nodejs8.10 # even just "nodejs" works
development: provided
production: provided
@dherault I wonder if it would be a good idea for serverless-offline to use custom options (same as for port, prefix etc.) to support runtime: provided until it's fully supported? e.g. something along those lines: provider:
runtime: provided
custom:
serverless-offline:
port: 8300
runtime-provided: nodejs # this option should be allowed to be set only if the provider runtime option is set to: provided |
Hello @dnalborczyk that is a nice idea! We would gladly accept a PR implementing this. I'll put it on my check list for in case I get a few minutes to work on it. |
I did it. You can now set the |
@dherault nice! thank you!! just installed it and it works great! |
Serverless can now invoke provided runtimes, I think as of this PR: serverless/serverless#5863 Would it therefore be possible to make Serverless Offline work with other provided runtimes, like PHP? Is there anything I could do? I would really like to run a local APIGateway server for my PHP lambda functions, and am more than happy to help with a PR. |
Hi @harmenjanssen , I don't think a PR on the subject would be that easy since we don't use docker in the first place... But you can try ! |
Ha, I was hoping for a little more strategy. 😉 I was hoping, based on that statement, that now that Serverless does invoke provided runtimes, you already had an idea of how to integrate? |
@dherault I Took a look and found out that it is fairly easy to support provided runtimes. I Could make a PR if you think it's worth it. |
@atrope absolutely, do it!! |
@dnalborczyk can you please have a look in the PR and help testing it? |
@atrope yes, will do! probably later today ... |
@atrope I got it running yesterday, and generally, it seems to work. although I noticed a couple things which might need some changes or fixes, and I'm not sure about the expectations and the work flow in general. that might be better answered by @dherault . I'll try to write some comments later today in the PR. |
I need NodeJS 10, so followed instructions found here.
But then, it appears that Serverless-Offline does not work. I see this:
And my routes are not emitted.
This issue seems related to #562.
The text was updated successfully, but these errors were encountered: