Lambda Netcore 3.1 why cloudsearchdomain search hang when it is deployed?
0
hello,
i have a lambda net core 3.1 +apigateway that must launch a search on a cloudsearchdomain.
i use this code :
using (var client = new AmazonCloudSearchDomainClient(searchServiceConfig))
{
....
LambdaLogger.Log("launch search");
Task<SearchResponse> task = client.SearchAsync(request);
task.Wait(); //// hang here
LambdaLogger.Log("parse result");/// this message don't appear in the cloudwatch log
SearchResponse response = task.Result;
LambdaLogger.Log("after parse result");
totalResult = response.Hits.Found;
when i test this code :
in a windows app : OK
with Mock Lambda Test Tools : OK
deployed in lambda on aws infrastruture : KO the code don't pass the task.Wait() instruction.
any idea for unblock this problem ?