According to documentation Lambda should leave message in queue if errors happens. https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html There is sentence "When your function returns an error, Lambda leaves it in the queue." My first idea was that if I throw new Exception that would work. However it seems my messages are processed and deleted. Why and how to return error from Lambda in .NET?
For example, should this leave message in queue:
public async Task FunctionHandler(SQSEvent evnt, ILambdaContext context)
{
throw new Exception ("Whole point of this function is that is retriable in case of error. Why I am deleted from the queue if exception is thrown?");
}
