Closed akanshi-elastic closed 1 year ago
Can you reproduce the same using aiobotocore
?
aiobotocore
getting same error while running the code with aioborocore as well:
import asyncio
from aiobotocore.session import get_session
async def go():
bucket = 'es-ent-2'
session = get_session()
async with session.create_client('s3') as client:
# get object from s3
response = await client.get_object(Bucket=bucket, Key="50kb-doc (4) (1).paper")
# this will ensure the connection is correctly re-used/closed
async with response['Body'] as stream:
print(await stream.read())
loop = asyncio.get_event_loop()
loop.run_until_complete(go())
Yup, so you'll need to raise an issue on the aiobotocore
repo then, as the calls by aioboto3 are passed through to it.
Requirements
Description
I observed that when I create resource using default region which was mentioned in
aws configure
and try to access(using same resource) a bucket(newly created bucket) inus-west-2
usingaioboto3
it gives an errorAccess denied
for few days and then it starts working. Usingboto3
it works fine.Code Snipppet