New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploaded function has a 50/50 chance to succeed. #25
Comments
Can you provide the code here to reproduce the problem? |
Do you have your lambda's network configured right, if you configure other of your VPC subnets wrong (you need two!) then lambda will work 50% of the time. |
The total code is a bit difficult to show here due to the length. Here is the basic content. Everything inside Cmyclass is standard C++ and thoroughly tested. invocation_response my_handler(invocation_request const& request) Cmyclass *pmyclass= new Cmyclass;
return invocation_response::success(str, "application/json"); In the test function on the page of aws-lambda, it shows me: START RequestId: 1b475a69-f9a9-4b13-8b45-aca566c7ecc8 Version: $LATEST So the typoed "Sucess" indicate that the myclass method has gone through with no problem, correct? |
I chose no VPC by default for just trying this. Basically all the configurations are default. Is one required to run smoothly? |
The code you pasted above seems fine. |
No it is not . get_str() is a std::string get_str() and every time it did print out "Sucess". |
I didn't mean the signature of get_str(). In the case of (a) it's a dangling reference if you |
I am pretty sure it is (b). Yet it still crash... |
Hello,
Fantastic sdk and very much needed.
Recently I followed the basic tutorial and run a simple C++ program on aws lambda.
However, it has a 50/50 chance of success, which is very confusing.
It is a simple program with little usage of dynamic memory allocation and only printf and std::string is used from the standard library.
When it failed, it returns
{
"errorMessage": "RequestId: da9a1e36-07cb-45a2-9e4e-db2f80288d11 Process exited before completing request"
}
The printf marks I put there indicates the code went through just fine but it failed to get out of the handler function.
What can be the issue?
Thank you.
The text was updated successfully, but these errors were encountered: