It would be helpful to allow download of public files without first configuring credentials.
$ aws s3 cp s3://bucket/file .
Unable to locate credentials
Completed 1 part(s) with ... file(s) remaining
$ aws --version
aws-cli/1.3.14 Python/2.7.2 Darwin/10.8.0
There's a --no-sign-request
option that tells the CLI not to sign the request nor look for credentials, which should work for this case. The only catch is that you have to specify the correct region in which the bucket is located (otherwise you get a moved permanently error).
Hey - when using this flag I still see a request for creds.
$ aws --debug --no-sign-request --region=us-east-3 s3 sync s3://my-bucket ./media !10518
2015-03-14 21:57:19,917 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.6.10 Python/3.4.3 Linux/3.18.6-1-ARCH, botocore version: 0.80.0
2015-03-14 21:57:19,917 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x7fd915168a60>
2015-03-14 21:57:19,917 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider at 0x7fd91512b400>
2015-03-14 21:57:19,918 - MainThread - botocore.hooks - DEBUG - Event building-command-table.s3: calling handler <function add_waiters at 0x7fd9151332f0>
2015-03-14 21:57:19,918 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.s3.anonymous: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,919 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sync: calling handler <function register_sync_strategies at 0x7fd9151adc80>
2015-03-14 21:57:19,919 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sync: calling handler <function add_waiters at 0x7fd9151332f0>
2015-03-14 21:57:19,919 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method SizeOnlySync.add_sync_argument of <awscli.customizations.s3.syncstrategy.sizeonly.SizeOnlySync object at 0x7fd914aebc88>>
2015-03-14 21:57:19,919 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method ExactTimestampsSync.add_sync_argument of <awscli.customizations.s3.syncstrategy.exacttimestamps.ExactTimestampsSync object at 0x7fd914aebda0>>
2015-03-14 21:57:19,919 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method DeleteSync.add_sync_argument of <awscli.customizations.s3.syncstrategy.delete.DeleteSync object at 0x7fd914aebd68>>
2015-03-14 21:57:19,921 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,922 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-language: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,922 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,922 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.exact-timestamps: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,922 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthand object at 0x7fd915282860>
2015-03-14 21:57:19,922 - MainThread - awscli.argprocess - DEBUG - Detected structure: scalar
2015-03-14 21:57:19,922 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-encoding: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,922 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.dryrun: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,922 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthand object at 0x7fd915282860>
2015-03-14 21:57:19,922 - MainThread - awscli.argprocess - DEBUG - Detected structure: scalar
2015-03-14 21:57:19,922 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.paths: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.size-only: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthand object at 0x7fd915282860>
2015-03-14 21:57:19,923 - MainThread - awscli.argprocess - DEBUG - Detected structure: scalar
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.delete: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthand object at 0x7fd915282860>
2015-03-14 21:57:19,923 - MainThread - awscli.argprocess - DEBUG - Detected structure: scalar
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.acl: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.cache-control: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.storage-class: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.only-show-errors: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthand object at 0x7fd915282860>
2015-03-14 21:57:19,923 - MainThread - awscli.argprocess - DEBUG - Detected structure: scalar
2015-03-14 21:57:19,923 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.expires: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.grants: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.follow-symlinks: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthand object at 0x7fd915282860>
2015-03-14 21:57:19,924 - MainThread - awscli.argprocess - DEBUG - Detected structure: scalar
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthand object at 0x7fd915282860>
2015-03-14 21:57:19,924 - MainThread - awscli.argprocess - DEBUG - Detected structure: scalar
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.source-region: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.quiet: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthand object at 0x7fd915282860>
2015-03-14 21:57:19,924 - MainThread - awscli.argprocess - DEBUG - Detected structure: scalar
2015-03-14 21:57:19,924 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-disposition: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,925 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.website-redirect: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,925 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-type: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,925 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,925 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.page-size: calling handler <function uri_param at 0x7fd9152ded90>
2015-03-14 21:57:19,925 - MainThread - botocore.service - DEBUG - Creating service object for: s3
2015-03-14 21:57:19,957 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function register_retries_for_service at 0x7fd915903048>
2015-03-14 21:57:19,960 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: s3
2015-03-14 21:57:19,961 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function signature_overrides at 0x7fd9159031e0>
2015-03-14 21:57:19,961 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function register_retries_for_service at 0x7fd915903048>
2015-03-14 21:57:19,961 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: s3
2015-03-14 21:57:19,961 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function signature_overrides at 0x7fd9159031e0>
2015-03-14 21:57:19,961 - MainThread - botocore.hooks - DEBUG - Event service-created: calling handler <function disable_signing at 0x7fd9151dfd08>
2015-03-14 21:57:19,962 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2015-03-14 21:57:19,963 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role
2015-03-14 21:57:19,963 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: shared-credentials-file
2015-03-14 21:57:19,963 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: config-file
2015-03-14 21:57:19,963 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: ec2-credentials-file
2015-03-14 21:57:19,963 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: boto-config
2015-03-14 21:57:19,963 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: iam-role
2015-03-14 21:57:19,967 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTP connection (1): 169.254.169.254
2015-03-14 21:57:20,968 - MainThread - botocore.utils - DEBUG - Caught exception while trying to retrieve credentials: (<botocore.vendored.requests.packages.urllib3.connectionpool.HTTPConnectionPool object at 0x7fd91494bd68>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 285, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.4/http/client.py", line 1088, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.4/site-packages/botocore/awsrequest.py", line 116, in _send_request
self, method, url, body, headers)
File "/usr/lib/python3.4/http/client.py", line 1126, in _send_request
self.endheaders(body)
File "/usr/lib/python3.4/http/client.py", line 1084, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.4/site-packages/botocore/awsrequest.py", line 130, in _send_output
self.send(msg)
File "/usr/lib/python3.4/site-packages/botocore/awsrequest.py", line 203, in send
return HTTPConnection.send(self, str)
File "/usr/lib/python3.4/http/client.py", line 857, in send
self.connect()
File "/usr/lib/python3.4/http/client.py", line 834, in connect
self.timeout, self.source_address)
File "/usr/lib/python3.4/socket.py", line 512, in create_connection
raise err
File "/usr/lib/python3.4/socket.py", line 503, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/adapters.py", line 321, in send
timeout=timeout
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 471, in urlopen
body=body, headers=headers)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 289, in _make_request
(self.host, timeout_obj.connect_timeout))
botocore.vendored.requests.packages.urllib3.exceptions.ConnectTimeoutError: (<botocore.vendored.requests.packages.urllib3.connectionpool.HTTPConnectionPool object at 0x7fd91494bd68>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/botocore/utils.py", line 143, in _get_request
response = requests.get(url, timeout=timeout)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/sessions.py", line 361, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/sessions.py", line 464, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/adapters.py", line 365, in send
raise Timeout(e)
botocore.vendored.requests.exceptions.Timeout: (<botocore.vendored.requests.packages.urllib3.connectionpool.HTTPConnectionPool object at 0x7fd91494bd68>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')
2015-03-14 21:57:20,971 - MainThread - botocore.utils - DEBUG - Max number of attempts exceeded (1) when attempting to retrieve data from metadata service.
2015-03-14 21:57:20,972 - MainThread - botocore.service - DEBUG - Creating service object for: s3
2015-03-14 21:57:20,972 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function register_retries_for_service at 0x7fd915903048>
2015-03-14 21:57:20,972 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: s3
2015-03-14 21:57:20,972 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function signature_overrides at 0x7fd9159031e0>
2015-03-14 21:57:20,972 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function register_retries_for_service at 0x7fd915903048>
2015-03-14 21:57:20,973 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: s3
2015-03-14 21:57:20,973 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function signature_overrides at 0x7fd9159031e0>
2015-03-14 21:57:20,973 - MainThread - botocore.hooks - DEBUG - Event service-created: calling handler <function disable_signing at 0x7fd9151dfd08>
2015-03-14 21:57:20,973 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2015-03-14 21:57:20,973 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role
2015-03-14 21:57:20,973 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: shared-credentials-file
2015-03-14 21:57:20,973 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: config-file
2015-03-14 21:57:20,974 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: ec2-credentials-file
2015-03-14 21:57:20,974 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: boto-config
2015-03-14 21:57:20,974 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: iam-role
2015-03-14 21:57:20,976 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTP connection (1): 169.254.169.254
2015-03-14 21:57:21,977 - MainThread - botocore.utils - DEBUG - Caught exception while trying to retrieve credentials: (<botocore.vendored.requests.packages.urllib3.connectionpool.HTTPConnectionPool object at 0x7fd914967fd0>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 285, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.4/http/client.py", line 1088, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.4/site-packages/botocore/awsrequest.py", line 116, in _send_request
self, method, url, body, headers)
File "/usr/lib/python3.4/http/client.py", line 1126, in _send_request
self.endheaders(body)
File "/usr/lib/python3.4/http/client.py", line 1084, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.4/site-packages/botocore/awsrequest.py", line 130, in _send_output
self.send(msg)
File "/usr/lib/python3.4/site-packages/botocore/awsrequest.py", line 203, in send
return HTTPConnection.send(self, str)
File "/usr/lib/python3.4/http/client.py", line 857, in send
self.connect()
File "/usr/lib/python3.4/http/client.py", line 834, in connect
self.timeout, self.source_address)
File "/usr/lib/python3.4/socket.py", line 512, in create_connection
raise err
File "/usr/lib/python3.4/socket.py", line 503, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/adapters.py", line 321, in send
timeout=timeout
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 471, in urlopen
body=body, headers=headers)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 289, in _make_request
(self.host, timeout_obj.connect_timeout))
botocore.vendored.requests.packages.urllib3.exceptions.ConnectTimeoutError: (<botocore.vendored.requests.packages.urllib3.connectionpool.HTTPConnectionPool object at 0x7fd914967fd0>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/botocore/utils.py", line 143, in _get_request
response = requests.get(url, timeout=timeout)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/sessions.py", line 361, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/sessions.py", line 464, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.4/site-packages/botocore/vendored/requests/adapters.py", line 365, in send
raise Timeout(e)
botocore.vendored.requests.exceptions.Timeout: (<botocore.vendored.requests.packages.urllib3.connectionpool.HTTPConnectionPool object at 0x7fd914967fd0>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')
2015-03-14 21:57:21,978 - MainThread - botocore.utils - DEBUG - Max number of attempts exceeded (1) when attempting to retrieve data from metadata service.
2015-03-14 21:57:21,979 - MainThread - botocore.hooks - DEBUG - Event choosing-s3-sync-strategy: calling handler <bound method SizeOnlySync.use_sync_strategy of <awscli.customizations.s3.syncstrategy.sizeonly.SizeOnlySync object at 0x7fd914aebc88>>
2015-03-14 21:57:21,979 - MainThread - botocore.hooks - DEBUG - Event choosing-s3-sync-strategy: calling handler <bound method ExactTimestampsSync.use_sync_strategy of <awscli.customizations.s3.syncstrategy.exacttimestamps.ExactTimestampsSync object at 0x7fd914aebda0>>
2015-03-14 21:57:21,979 - MainThread - botocore.hooks - DEBUG - Event choosing-s3-sync-strategy: calling handler <bound method DeleteSync.use_sync_strategy of <awscli.customizations.s3.syncstrategy.delete.DeleteSync object at 0x7fd914aebd68>>
2015-03-14 21:57:21,981 - MainThread - botocore.service - DEBUG - Creating operation objects for: Service(s3)
2015-03-14 21:57:21,988 - MainThread - botocore.operation - DEBUG - Operation:ListObjects called with kwargs: {'encoding_type': 'url', 'bucket': 'globalcitizen-staging', 'prefix': ''}
2015-03-14 21:57:21,989 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.ListObjects: calling handler <function add_expect_header at 0x7fd915903268>
2015-03-14 21:57:21,989 - MainThread - botocore.endpoint - DEBUG - Making request for <botocore.model.OperationModel object at 0x7fd9148d9160> (verify_ssl=True) with params: {'headers': {}, 'url_path': '/globalcitizen-staging', 'method': 'GET', 'body': '', 'query_string': {'prefix': '', 'encoding-type': 'url'}}
2015-03-14 21:57:21,989 - MainThread - botocore.hooks - DEBUG - Event before-auth.s3: calling handler <function fix_s3_host at 0x7fd915901e18>
2015-03-14 21:57:21,990 - MainThread - awscli.customizations.s3.s3handler - DEBUG - Exception caught during task execution: Unable to locate credentials
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/awscli/customizations/s3/s3handler.py", line 92, in call
total_files, total_parts = self._enqueue_tasks(files)
File "/usr/lib/python3.4/site-packages/awscli/customizations/s3/s3handler.py", line 173, in _enqueue_tasks
for filename in files:
File "/usr/lib/python3.4/site-packages/awscli/customizations/s3/fileinfobuilder.py", line 32, in call
for file_base in files:
File "/usr/lib/python3.4/site-packages/awscli/customizations/s3/comparator.py", line 79, in call
src_file = advance_iterator(src_files)
File "/usr/lib/python3.4/site-packages/awscli/customizations/s3/filegenerator.py", line 139, in call
for src_path, size, last_update in file_list:
File "/usr/lib/python3.4/site-packages/awscli/customizations/s3/filegenerator.py", line 285, in list_objects
page_size=self.page_size):
File "/usr/lib/python3.4/site-packages/awscli/customizations/s3/utils.py", line 402, in list_objects
for response, page in pages:
File "/usr/lib/python3.4/site-packages/botocore/paginate.py", line 70, in __iter__
response = self._make_request(current_kwargs)
File "/usr/lib/python3.4/site-packages/botocore/paginate.py", line 390, in _make_request
return self._operation.call(self._endpoint, **current_kwargs)
File "/usr/lib/python3.4/site-packages/botocore/operation.py", line 90, in call
response = endpoint.make_request(self.model, request_dict)
File "/usr/lib/python3.4/site-packages/botocore/endpoint.py", line 108, in make_request
prepared_request = self.create_request(request_dict)
File "/usr/lib/python3.4/site-packages/botocore/endpoint.py", line 134, in create_request
prepared_request = self.prepare_request(request, signer)
File "/usr/lib/python3.4/site-packages/botocore/endpoint.py", line 163, in prepare_request
signer.add_auth(request=request)
File "/usr/lib/python3.4/site-packages/botocore/auth.py", line 305, in add_auth
raise NoCredentialsError
botocore.exceptions.NoCredentialsError: Unable to locate credentials
2015-03-14 21:57:21,992 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,992 - Thread-1 - awscli.customizations.s3.executor - DEBUG - Received print task: PrintTask(message='Unable to locate credentials', error=True, total_parts=None, warning=None)
Unable to locate credentials
2015-03-14 21:57:21,993 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,993 - Thread-5 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,993 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,993 - Thread-6 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,994 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,994 - Thread-7 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,994 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,994 - Thread-8 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,994 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,994 - Thread-9 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,994 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,995 - Thread-10 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,995 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,995 - Thread-11 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,995 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,995 - Thread-12 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,995 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for worker thread (priority: 1)
2015-03-14 21:57:21,995 - Thread-13 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,996 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-5, stopped daemon 140570244671232)>
2015-03-14 21:57:21,996 - Thread-14 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in worker thread, shutting down worker thread.
2015-03-14 21:57:21,996 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-5, stopped daemon 140570244671232)>
2015-03-14 21:57:21,996 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-6, stopped daemon 140570236278528)>
2015-03-14 21:57:21,996 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-6, stopped daemon 140570236278528)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-7, stopped daemon 140570227885824)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-7, stopped daemon 140570227885824)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-8, stopped daemon 140570219493120)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-8, stopped daemon 140570219493120)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-9, stopped daemon 140570211100416)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-9, stopped daemon 140570211100416)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-10, stopped daemon 140570202707712)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-10, stopped daemon 140570202707712)>
2015-03-14 21:57:21,997 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-11, stopped daemon 140569716193024)>
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-11, stopped daemon 140569716193024)>
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-12, stopped daemon 140569707800320)>
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-12, stopped daemon 140569707800320)>
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-13, stopped daemon 140569699407616)>
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-13, stopped daemon 140569699407616)>
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for thread to shutdown: <Worker(Thread-14, stopped daemon 140569691014912)>
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Thread has been shutdown: <Worker(Thread-14, stopped daemon 140569691014912)>
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for result thread.
2015-03-14 21:57:21,998 - MainThread - awscli.customizations.s3.executor - DEBUG - Queueing end sentinel for IO thread.
2015-03-14 21:57:21,999 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for result thread to shutdown.
2015-03-14 21:57:21,999 - Thread-1 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in print thread, shutting down print thread.
2015-03-14 21:57:21,999 - Thread-2 - awscli.customizations.s3.executor - DEBUG - Shutdown request received in IO thread, shutting down.
2015-03-14 21:57:21,999 - MainThread - awscli.customizations.s3.executor - DEBUG - Waiting for IO thread to shutdown.
2015-03-14 21:57:21,999 - MainThread - awscli.customizations.s3.executor - DEBUG - All threads have been shutdown.
@gone
Can you upgrade to the latest version of the CLI and let me know if you still are seeing the issue? I believe it was fixed in this PR: https://github.com/aws/aws-cli/pull/1088
It would be cool if error message would tell that this option exist. Like "consider using --no-sign-request
".
Had the same problem, request
module is all it took, see Download file/folder from Public AWS S3 with Python, no credentials
Most helpful comment
There's a
--no-sign-request
option that tells the CLI not to sign the request nor look for credentials, which should work for this case. The only catch is that you have to specify the correct region in which the bucket is located (otherwise you get a moved permanently error).