amol- / depot

Toolkit for storing files and attachments in web applications
MIT License
161 stars 41 forks source link

[breaking change] Release 0.5.1 requires additional AWS policy #51

Closed SharpEdgeMarshall closed 6 years ago

SharpEdgeMarshall commented 6 years ago

Description

Version 0.5.1 requires an additional AWS policy: s3:ListAllMyBuckets that wasn't required on 0.5.0

Error

File "/usr/local/lib/python3.6/site-packages/depot/manager.py", line 102, in configure
    cls._depots[name] = cls.from_config(config, prefix)
  File "/usr/local/lib/python3.6/site-packages/depot/manager.py", line 160, in from_config
    return cls._new(backend, **options)
  File "/usr/local/lib/python3.6/site-packages/depot/manager.py", line 140, in _new
    return class_(**options)
  File "/usr/local/lib/python3.6/site-packages/depot/io/boto3.py", line 144, in __init__
    buckets = set(b['Name'] for b in self._s3.meta.client.list_buckets()['Buckets'])
  File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 312, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 601, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied

Cause

https://github.com/amol-/depot/commit/968c1891c400832b4e9d6a0f9d3d0983e8e53ddb#diff-760b5dcb28fc0a997246371ad5678d55R144