1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
I do not know what in the GCP APIs prevents the parallel access. If there is really something on their side, I would assume it has to do with an API Key or credentials. If this is the case, you will need to obtain multiple API keys/credentials so that you can run in parallel.
Assuming GCP is not the limiting factor, or that you can obtain multiple API Keys/credentials to run in parallel, you have a few options:
- Run multiple threads in your function. There is no reason the threads can't make a call to an API at the same time.
- Create an Express state machine in Step Functions and use the Map state to run a function in a loop, giving it high concurrency. Each invocation will check the status of one region. The total running time should not be much longer than the slowest region.
관련 콘텐츠
- AWS 공식업데이트됨 3년 전
- AWS 공식업데이트됨 일 년 전
Thank you for your response. I think the issue is related to the googleclientapis library. Instead of using it, I used an access token to make direct calls to the GCP endpoint, and it worked very efficiently, reducing the execution time significantly. Once again, thank you.