Need to run boto3 requests in parallel #3345
-
I am trying to run below code where each block pulls data from different AWS resources like ec2, rds etc. Here I have to perform some calculations using cloudwatch metrics. So I need to run each request in parallel. However, it seems like each request is running sequention. await asyncio.gather( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @shantanugupta, thanks for reaching out. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @shantanugupta, thanks for reaching out.
Per Multithreading/Multiprocessing doc, it’s recommended to create a new session object for each process. Also, here’s a stackoverflow post that might be helpful to check out. Please let me know if you have any other questions!