boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden

I’m using Amazon IAM for the particular key ID and access key and just bumped into the same 403 Forbidden… Turns out you need to give permissions that target both the bucket root and its subobjects: { “Statement”: [ { “Principal”: { “AWS”: “*” }, “Effect”: “Allow”, “Action”: “s3:*”, “Resource”: [“arn:aws:s3:::bucket-name/*”, “arn:aws:s3:::bucket-name”] } ] }

How to set-up a Django project with django-storages and Amazon S3, but with different folders for static files and media files?

I think the following should work, and be simpler than Mandx’s method, although it’s very similar: Create a s3utils.py file: from storages.backends.s3boto import S3BotoStorage StaticRootS3BotoStorage = lambda: S3BotoStorage(location=’static’) MediaRootS3BotoStorage = lambda: S3BotoStorage(location=’media’) Then in your settings.py: DEFAULT_FILE_STORAGE = ‘myproject.s3utils.MediaRootS3BotoStorage’ STATICFILES_STORAGE = ‘myproject.s3utils.StaticRootS3BotoStorage’ A different but related example (that I’ve actually tested) can be seen in … Read more