-
Notifications
You must be signed in to change notification settings - Fork 74
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
'Unclosed connection' warning when using S3 client #338
Comments
Can you replicate this using |
Hm.. Good one.. It appears i can replicate using aiobotocore.
The |
I'd suggest raising an issue over on |
Yup, already did. Thanks a lot! :) |
FWIW, I'm also running into this problem: async def stream_s3(
s3_client: "S3Client",
bucket_name: str,
key: str,
) -> AsyncGenerator[bytes, None]:
s3_obj = await s3_client.get_object(
Bucket=bucket_name,
Key=key,
)
async with s3_obj['Body'] as stream:
body = await stream.read()
yield body
# This also doesn't work
# async for chunk in s3_obj['Body']:
# yield chunk
I'm using FastAPI and Related (I think) issue: |
FWIW, I managed to work around this by using |
Description
I'm receiving warning when using S3 client:
I have following function that is supposed to return information about object stored in S3:
Another function calls
get_s3_object
and everything works fine, but i get warning mentioned above.I'm using the client as suggested, by creating a session then using the .client or .resource as context manager, but it appears as if it's not closing the S3 connection
The text was updated successfully, but these errors were encountered: