Support Multiple Runtimes (Python/NodeJS) in same serverless.yml
See original GitHub issueCurrently esbuild wants to also compile my python code.
Steps to replicate
typescript-lambda:
handler: ./src/typescript/lambda.handler
python:
handler: ./src/python/lambda.handler
runtime: python3.9
$ yarn sls package
Serverless: Compiling to node14 bundle with esbuild...
Cannot locate handler - ./src/python/lambda not found
Error ---------------------------------------------------
Error: Compilation failed. Please ensure you have an index file with ext .ts or .js,
or have a path listed as main key in package.json
Proposed Solution
- Ignore any files that have entry points, where the runtime is not
nodejs.xx.x
; this will prevent esbuild attempt to compile them. - This ignore should include not adding node_modules to the zip file created for those
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top Results From Across the Web
How to use multiple runtimes in a single serverless microservice
How to build an application using multiple runtimes to supported mixed-language development with the Serverless Framework.
Read more >Support multiple runtimes? · Issue #80 · serverless ... - GitHub
I'm trying to use this plugin in a multiple runtime environment (python + node.js). Does serverless-python-requirements support multiple ...
Read more >Serverless framework - Use multiple runtimes (TS / Python)
We would like to add one lambda, using python (because we want to embed the AWS CLI in this one, and I believe...
Read more >Best practices for organizing larger serverless applications
For example, many web applications that are migrated to Lambda use web frameworks like Flask (for Python) or Express (for Node.js).
Read more >AWS Lambda function with Serverless Framework - Medium
It manages your code as well as your infrastructure; It supports multiple languages (Node.js, Python, Java, and more).
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 FreeTop 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
Top GitHub Comments
Thanks guys, I’ll take a look some time in the next 24 hours.
No problemo, glad I could help. Hope you have a good day 🙂
@shichongrui if you have any other issues, feel free to open a new issue