1 Answer
- Newest
- Most votes
- Most comments
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.
Relevant content
- asked 6 months ago
- asked 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
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.