s3fs: S3 error : Unable to locate credentials

Hello,

since asynciohttp v3.8.1 was deployed on condaforge 3 days ago while trying to use s3fs with iamRole based credentials in AWS EC2 servers, we are encountering the following errors :

  File "fastparquet/api.py", line 132, in __init__
  File "fsspec/asyn.py", line 91, in wrapper
  File "fsspec/asyn.py", line 71, in sync
  File "fsspec/asyn.py", line 25, in _runner
  File "s3fs/core.py", line 1128, in _isdir
  File "s3fs/core.py", line 580, in _lsdir
  File "aiobotocore/paginate.py", line 32, in __anext__
  File "aiobotocore/client.py", line 142, in _make_api_call
  File "aiobotocore/client.py", line 161, in _make_request
  File "aiobotocore/endpoint.py", line 77, in _send_request
  File "aiobotocore/endpoint.py", line 71, in create_request
  File "aiobotocore/hooks.py", line 27, in _emit
  File "aiobotocore/signers.py", line 16, in handler
  File "aiobotocore/signers.py", line 63, in sign
  File "botocore/auth.py", line 373, in add_auth
botocore.exceptions.NoCredentialsError: Unable to locate credentials

It seems that fixing aiohttp in version v3.7.4.post0 solves this issue.

Not also that we are not encountering the same errors on the same codebase on tasks that are running on Fargate instead of EC2.

I guess it would be good to investigate what happened with aiohttp (which is required by aiobotocore)

Any better solution than fixing aiohttp version is welcome !

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 28 (23 by maintainers)

Commits related to this issue

Most upvoted comments

We are trying to reproduce the issue in isolation, from our application with no luck so far. What I can confirm is that it is not working with either aiohttp 3.8.0 nor 3.8.1 but it works fine with version 3.7.4.post0 I will keep you posted if we have a setup that can be exported and that let us reproduce the issue in a consistent manner

@achimgaedke I didn’t take the opportunity yet, but many thanks to you for fixing on this issue, you are a life saver !

@achimgaedke , would you like to make a PR with that change, when available?