I'm fairly new to Rust and AWS Lambda. I am developing our first function that will be triggered by an SQS subscription with batch processing. The SQS will then be triggered from an SNS Topic. We use the CloudFormation template to set up our stacks and use our in-house CI/CD pipeline triggered from a GitHub repo.
We use the cargo lambda
package to develop the function. https://github.com/cargo-lambda/cargo-lambda
I'm trying out the example code from the AWS Labs repo. When I test the lambda, I got this error:
{
"errorType": "Runtime.ExitError",
"errorMessage": "RequestId: fa19660a-b221-4c0a-a61b-6f0239bdd0a6 Error: Runtime exited with error: signal: illegal instruction"
}
I tested it from the Test tab in the AWS console, with the SQS template test.
Not sure why. I didn't do any modifications to the example code. The error doesn't give me any clue about what's wrong with my setup.
I have increased the memory to 1024 MB, based on some threads in SO [1][2][3]. No luck so far. I can see the binary bootstrap file inside the lambda directory.
Anyone can help?
This is due to the compilation error. We use it in our CI/CD pipeline. This is the workflow file that works: