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
질문됨 4년 전159회 조회
1개 답변
0

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

WANAOJD
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠