would you please help to run collect static to amazon s3?
this is my config file:
05_collect_admin_static:
command: "python manage.py collectstatic --noinput"
leader_only: true
in setting file i am using django-storages==1.1.8 and boto==2.32.1
INSTALLED_APPS += ('storages',)
AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID']
AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_KEY']
AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME']
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
S3_URL = 'http://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME
STATIC_URL = S3_URL
and this is my log:
/var/log/cfn-init.log
execute_from_command_line(sys.argv)
File "/opt/python/run/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/opt/python/run/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/python/run/venv/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/opt/python/run/venv/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/opt/python/run/venv/lib/python2.7/site-packages/django/core/management/base.py", line 415, in handle
return self.handle_noargs(**options)
File "/opt/python/run/venv/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 173, in handle_noargs
collected = self.collect()
File "/opt/python/run/venv/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 112, in collect
handler(path, prefixed_path, storage)
File "/opt/python/run/venv/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 317, in copy_file
self.storage.save(prefixed_path, source_file)
File "/opt/python/run/venv/lib/python2.7/site-packages/django/core/files/storage.py", line 49, in save
name = self._save(name, content)
File "/opt/python/run/venv/lib/python2.7/site-packages/storages/backends/s3boto.py", line 392, in _save
self._save_content(key, content, headers=headers)
File "/opt/python/run/venv/lib/python2.7/site-packages/storages/backends/s3boto.py", line 403, in _save_content
rewind=True, **kwargs)
File "/opt/python/run/venv/lib/python2.7/site-packages/boto/s3/key.py", line 1286, in set_contents_from_file
chunked_transfer=chunked_transfer, size=size)
File "/opt/python/run/venv/lib/python2.7/site-packages/boto/s3/key.py", line 746, in send_file
chunked_transfer=chunked_transfer, size=size)
File "/opt/python/run/venv/lib/python2.7/site-packages/boto/s3/key.py", line 944, in _send_file_internal
query_args=query_args
File "/opt/python/run/venv/lib/python2.7/site-packages/boto/s3/connection.py", line 664, in make_request
retry_handler=retry_handler
File "/opt/python/run/venv/lib/python2.7/site-packages/boto/connection.py", line 1053, in make_request
retry_handler=retry_handler)
File "/opt/python/run/venv/lib/python2.7/site-packages/boto/connection.py", line 923, in _mexe
request.body, request.headers)
File "/opt/python/run/venv/lib/python2.7/site-packages/boto/s3/key.py", line 840, in sender
http_conn.send(chunk)
File "/usr/lib64/python2.7/httplib.py", line 805, in send
self.sock.sendall(data)
File "/usr/lib64/python2.7/ssl.py", line 229, in sendall
v = self.send(data[count:])
File "/usr/lib64/python2.7/ssl.py", line 198, in send
v = self._sslobj.write(data)
socket.error: [Errno 104] Connection reset by peer
thanks. is it related to permission issue? i am using aws elastic beanstalk. thanks again.