-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
share aiohttp.ClientSession between clients #797
Comments
My 2c - good question - but aiobotocore is kinda tied to botocore design patterns (AFAIK) and it has to stick with the patterns in In botocore, if you want to try to override things by first creating a single client and then using it everywhere else (for a given AWS service, of course), you could register a handler for the Details are in
Some related notes on |
Thanks @dazza-codes for your reply. I can see the pattern in |
aiobotocore follows botocore, which my default uses a session per client, however, it allows you to pass in your own session class, see https://github.com/boto/botocore/blob/develop/botocore/endpoint.py#L280 so you can try using that however it doesn't seemed to be hooked up all the way in botocore. Fixing a small bug of this in #844 |
According to documentation at https://docs.aiohttp.org/en/stable/client_reference.html#client-reference it's suggested to use single ClientSession for app
Is there any way how to achieve sharing single ClientSession in aiobotocore accross multiple clients? I'm running multiple requests to AWS resources and each
client
uses own ClientSession.Thanks
The text was updated successfully, but these errors were encountered: