terricain / aioboto3

Wrapper to use boto3 resources with the aiobotocore async backend
Apache License 2.0
748 stars 76 forks source link

Unable to locate credentials #218

Closed fox91 closed 3 years ago

fox91 commented 3 years ago
aioboto3==8.2.0
aiobotocore==1.1.2
aiohttp==3.7.3
boto3==1.14.44
botocore==1.17.44

Description

I need to download one hundred files from S3 and I'm using aioboto3. After the first 50-60 files (the number also varies from time to time) I get this error for some files:

Caught retryable HTTP exception while making metadata service request to http://169.254.169.254/latest/meta-data/iam/security-credentials/REDACTED: 
Traceback (most recent call last):
  File "/home/ubuntu/ENV/lib/python3.8/site-packages/aiobotocore/utils.py", line 79, in _get_request
    async with session.get(url, headers=headers) as resp:
  File "/home/ubuntu/ENV/lib/python3.8/site-packages/aiohttp/client.py", line 1117, in __aenter__
    self._resp = await self._coro
  File "/home/ubuntu/ENV/lib/python3.8/site-packages/aiohttp/client.py", line 619, in _request
    break
  File "/home/ubuntu/ENV/lib/python3.8/site-packages/aiohttp/helpers.py", line 656, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

repeated many times and than:

Max number of attempts exceeded (1) when attempting to retrieve data from metadata service

I'm using it in the wrong way or we are hitting some limit of the metadata service?

I think It's related to https://github.com/aio-libs/aiobotocore/issues/808

terricain commented 3 years ago

Hey, this would be an aiobotocore issue if at all.