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&#39;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 ?

WANAOJD
demandé il y a 4 ans158 vues
1 réponse
0

it was not a problem with async method. it was a problem with vpc

WANAOJD
répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions