Closed chrg1001 closed 2 years ago
Not familiar enough with Serverless but for now seems like you need to configure somehow the right Runtime env during the deployment. This repo has nothing with your deploy process.
@zamazan4ik Thanks for your reply.
I read the source code of rust-serverless/serverless-rust and found the solution for this.
"serverless-rust": "^0.3.8"
uses original repo softprops/serverless-rust of rust-serverless/serverless-rust, and this issue has been fixed after v0.3.8 (this commit, not tagged).
In conclusion, the solution is updating package.json
like below at the moment.
P.S. Sorry, this is an unrelated issue to this repository.
{
"name": "demo",
"version": "0.0.1",
"devDependencies": {
"serverless": "^2.69.0",
// The latest commit at this time
"serverless-rust": "https://github.com/softprops/serverless-rust#d6686a6d1d3e6316afaf51c85002cf1cc9167292"
}
}
Maybe this repository is not the right place to raise this issue.
I am using rust-serverless/serverless-rust with this repo's docker image to deploy my rust project to lambda.
It was successfully deployed , but I got this error at runtime. (the same issue on awslabs/aws-lambda-rust-runtime/issues/17 )
When I checked the Lambda runtime setting on the AWS Console, it was set to ”Custom runtime".
I changed the Runtime setting to "Custom runtime on Amazon Linux 2" directly on the AWS Console, and it worked fine.
Is there any way to set this up for deploy timing?
Cargo.toml
serverless.yaml
package.json
Environment
OS : Windows 11 Node version : 14.16.1 Serverless Framework Version : 2.69.0