Open orenbenya1 opened 2 years ago
the "problem" with your setup is that serverless
itself and also aws lambda
do not support a "rust" runtime. the serverless-rust
plugin you are using is creating a binary called bootstrap
and pushes that up to lambda via serverless
instead, either as zipped-up binary or packaged in a docker image. (not 100% sure, only glanced at the code).
I'd definitely like serverless-offline
to work with rust binaries as well, but haven't found the time yet to look into it. that said, I believe the docker image approach should or could work, albeit not with the serverless-rust
plugin. it might be also possible to make runtime: provided/provided.al2
work as well locally without a docker container.
Bug Report
After running
sls offline start
command, I try to access the API gateway by accessing: http://localhost:3000/dev/health, and then I get an HTTP error 502, while in the terminal I see that sls offline start doesn't support rust. Any idea how to fix it? Because I really want to work with rust and I don't want to deploy my lambda function each time in order to access the API gateway (yes when I deploy it, it works).Current Behavior
Sample Code
Environment
serverless
version: 6.2.2serverless-offline
version: 8.8.0node.js
version: v16.13.2npm
version: 8.5.5OS
: Windows 10, Running on WSL (Ubuntu 20.04).rustc
version: rustc 1.61.0 (fe5b13d68 2022-05-18)