You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
async def download_json(key):
async with aioboto3.resource('s3') as s3:
obj = s3.Object(const.bucket, key)
result = await obj.get()
result = await result['Body'].read()
return json.loads(result.decode('utf-8'))['keys']
key = "..."
loop = asyncio.get_event_loop()
loop.run_until_complete(download_json(key))
# loop.close() # I had to skip this line, though I expect that was an issue with jupyter maybe.
Description
I tried to download file from S3, and I received error:
A Future or coroutine is required
In the documentation, I cannot find how to use the S3 properly except DynamoDB. Is it worth to update the doc ?
What I Did
The text was updated successfully, but these errors were encountered: