Giter Club home page Giter Club logo

Comments (13)

wesleykendall avatar wesleykendall commented on August 30, 2024 2

@etianen and others, I had this error until I found this boto/boto3#1644 (comment)

To get rid of this error, set the following settings:

AWS_S3_ADDRESSING_STYLE = 'path'

Now I successfully can view objects with boto3=1.14.45 and django-s3-storage="0.13.3"

@etianen do you think this should be changed to the default setting? I'm happy to open a PR. A better solution might be adjusting this based on the boto3 version, but I'm not sure if I will have time to make that PR

from django-s3-storage.

etianen avatar etianen commented on August 30, 2024

from django-s3-storage.

adamyala avatar adamyala commented on August 30, 2024

I sat down to recreate today and the problem went away. No idea why. Apologies for eating up some of your time.

If the issue comes back I'll reopen.

from django-s3-storage.

etianen avatar etianen commented on August 30, 2024

from django-s3-storage.

adamyala avatar adamyala commented on August 30, 2024

@etianen I'd like to reopen this issue and help debug the underlying cause. I have the latest boto3 version installed (1.9.27) and this bug reappeared. I downgraded to 1.5.2 per my note above to see if that would fix it, and it did fix it.

What information can I supply to start our research?

from django-s3-storage.

adamyala avatar adamyala commented on August 30, 2024

Below are my settings:

DEFAULT_FILE_STORAGE = 'django_s3_storage.storage.S3Storage'
STATICFILES_STORAGE = 'django_s3_storage.storage.StaticS3Storage'
# The AWS region to connect to.
AWS_REGION = 'us-west-2'
# The AWS access key to use.
AWS_ACCESS_KEY_ID = 'XXXX'
# The AWS secret access key to use.
AWS_SECRET_ACCESS_KEY = 'XXXX'
# The name of the bucket to store files in.
AWS_S3_BUCKET_NAME = AWS_S3_BUCKET_NAME_STATIC = 'XXXXX'

Note that this only seems to be failing locally (while developing on my laptop). When running on a server things seem fine.

from django-s3-storage.

etianen avatar etianen commented on August 30, 2024

from django-s3-storage.

Tjorriemorrie avatar Tjorriemorrie commented on August 30, 2024

I'm also getting a 403. Do I need to change the settings of the bucket or anything else?

from django-s3-storage.

vesatoivonen avatar vesatoivonen commented on August 30, 2024

The same thing was happening to me yesterday, but once i started to debug the issue today it seems to have vanished.
I did not change any packages in between.

boto3==1.9.127
Django==2.2
django-s3-storage==0.12.4

from django-s3-storage.

kciredor avatar kciredor commented on August 30, 2024

Same here. Pinning boto3 to 1.5.2 solved it immediately.

from django-s3-storage.

etianen avatar etianen commented on August 30, 2024

from django-s3-storage.

etianen avatar etianen commented on August 30, 2024

from django-s3-storage.

tomwojcik avatar tomwojcik commented on August 30, 2024

I struggled with lots of errors but finally managed to make it work (for generate_presigned_post).

I get my client from (if you need it)

client = S3Boto3Storage().bucket.meta.client

And those are the settings you need to experiment with

AWS_S3_SIGNATURE_VERSION = "s3v4"  # required for some regions
AWS_S3_ADDRESSING_STYLE = 'path'  # needed only in some cases, depending on your boto3 version
AWS_S3_REGION_NAME = ...  # might be necessary if your region is non-default
boto3==1.18.4
django-storages==1.11.1

from django-s3-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.