When running pysssix on a server which has no IAM role I am unable to read files despite having my credentials configured with aws configure
and stored in ~/.aws/credentials
.
$ cat /mnt/pysssix/mybucket/myfile.txt
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/fuse.py", line 495, in _wrapper
return func(*args, **kwargs) or 0
File "/usr/local/lib/python3.4/site-packages/fuse.py", line 511, in getattr
return self.fgetattr(path, buf, None)
File "/usr/local/lib/python3.4/site-packages/fuse.py", line 759, in fgetattr
attrs = self.operations('getattr', self._decode_optional_path(path), fh)
File "/usr/local/lib/python3.4/site-packages/fuse.py", line 800, in __call__
return getattr(self, op)(*args)
File "/usr/local/lib/python3.4/site-packages/pysssix/s3_fuse_ops.py", line 34, in getattr
attrs = s3_getattr(path)
File "/usr/lib64/python3.4/functools.py", line 472, in wrapper
result = user_function(*args, **kwds)
File "/usr/local/lib/python3.4/site-packages/pysssix/s3.py", line 71, in getattr
return {'st_mode': 33188, 'st_size': get_size(path)} if obj_type(path) == 2 else {'st_mode': 16877}
File "/usr/local/lib/python3.4/site-packages/pysssix/s3.py", line 57, in obj_type
if get_size(path) <= 0:
File "/usr/lib64/python3.4/functools.py", line 472, in wrapper
result = user_function(*args, **kwds)
File "/usr/local/lib/python3.4/site-packages/pysssix/s3.py", line 20, in get_size
response = s3.head_object(Bucket=bucket, Key=key)
File "/usr/local/lib/python3.4/site-packages/botocore/client.py", line 317, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.4/site-packages/botocore/client.py", line 602, in _make_api_call
operation_model, request_dict)
File "/usr/local/lib/python3.4/site-packages/botocore/endpoint.py", line 143, in make_request
return self._send_request(request_dict, operation_model)
File "/usr/local/lib/python3.4/site-packages/botocore/endpoint.py", line 168, in _send_request
request = self.create_request(request_dict, operation_model)
File "/usr/local/lib/python3.4/site-packages/botocore/endpoint.py", line 152, in create_request
operation_name=operation_model.name)
File "/usr/local/lib/python3.4/site-packages/botocore/hooks.py", line 227, in emit
return self._emit(event_name, kwargs)
File "/usr/local/lib/python3.4/site-packages/botocore/hooks.py", line 210, in _emit
response = handler(**kwargs)
File "/usr/local/lib/python3.4/site-packages/botocore/signers.py", line 90, in handler
return self.sign(operation_name, request)
File "/usr/local/lib/python3.4/site-packages/botocore/signers.py", line 154, in sign
auth.add_auth(request)
File "/usr/local/lib/python3.4/site-packages/botocore/auth.py", line 420, in add_auth
super(S3SigV4Auth, self).add_auth(request)
File "/usr/local/lib/python3.4/site-packages/botocore/auth.py", line 352, in add_auth
raise NoCredentialsError
botocore.exceptions.NoCredentialsError: Unable to locate credentials
cat: /mnt/pysssix/mybucket/myfile.txt: Bad address