aws-samples / serverless-rust-demo

Sample serverless application written in Rust
MIT No Attribution
271 stars 22 forks source link

Running Locally? #45

Open JimLynchCodes opened 2 years ago

JimLynchCodes commented 2 years ago

Hey! 👋

Nice project! The artillery load tests is a cool addition, too. 👍

I am wondering if it's possible to run this project locally.

I think something like serverless-offline would be a nice way to "host the lambdas locally"...

However, when I try to use it I get an error that the Rust runtime is not supported...

Any ideas for this? How can people productively develop something using this project?

Thanks!

nmoutschen commented 2 years ago

Hey @JimLynchCodes!

If I remember correctly, you're using the rust plugin for the Serverless framework, right? If that's the case, there might be an interference between that plugin and serverless-offline.

I also see that serverless-offline only supports Node, Python, Ruby, and Go runtimes at the moment. That said, once you've compiled your Lambda functions, any tool to run Lambda functions locally should work as long as it supports provided.al2. For example, sam local start-api works fine if I try with a project in SAM.