Custom runtime not workig for deployment of single function
See original GitHub issueThis is a (Bug Report)
Description
For bug reports:
- What went wrong?
serverless deploy function -f functionName
always triggers the “serverless-webpack” plugin even when the runtime is not “nodejs”. - What did you expect should have happened? serverless-webpack should not trigger on non nodejs runtimes (e.g. python)
The issue resides in within “lib/validate.js”. The pull request (https://github.com/serverless-heaven/serverless-webpack/pull/579/files) applied the custom runtime only for “serverless deploy” but not for “serverless deploy function -f”.
Similar or dependent issue(s):
Additional Data
- Serverless-Webpack Version you’re using: 5.4.0
- Webpack version you’re using: 4.46.0
- Serverless Framework Version you’re using: 2.31.0
- Operating System: Amazon Linux v2
- Stack Trace (if available):
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Troubleshoot deployment issues in Lambda
Learn how to troubleshoot common deployment issues in Lambda. ... The handler is the method in your function's code that the runtime runs...
Read more >Unable to deploy single lambda function for version 1.52.1
sls deploy -f "function_name" is not working throwing and exception. My serverless version is: Framework Core: 1.52.1. Plugin: 3.0.0
Read more >.NET 6 Custom Runtime for AWS Lambda | no dogma blog
You can't yet run .NET 6 on AWS Lambda with the familiar managed runtime, but you can with a custom runtime. Here are...
Read more >Deploy an Access application - Microsoft Support
What do you want to do? · Plan for deployment · Deploy an Access application · Understand and download the Access Runtime ·...
Read more >About Custom runtimes - App Engine - Google Cloud
When you use a custom runtime, you must write your application code to handle certain flexible environment life-cycle and health checking requests. Start...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I ran into this problem too in 5.5.1. Not sure if I missed any configs I could’ve set. I am trying to have one function run on go and the rest on nodejs.
serverless deploy
runs fine asserverless-webpack
will filter out non-node functions now and consolidate entries to only nodejs runtimes. But if the only function’s runtime is not nodejs or if you runserverless deploy function -f nonNodejsFunctionName
,slsw.entries
(which I am using in webpack config) will result in an empty object and this will cause webpack to error due to an empty entry field.I modified the code a bit on my end and got it to work by checking for empty entries after the ‘validate’ stage and exiting the next stages early. However I think not having
serverless-webpack
run at all may be a better solution in these cases.In fact, it might the fastest solution. I tried to hook into validate, compile & package but it adds a lot overhead.