Open Malthehave opened 5 years ago
Okay so if anyone is having the same issue I managed to get around it.
I set Block public access to buckets and objects granted through new access control lists (ACLs)
and Block public access to buckets and objects granted through any access control lists (ACLs)
to off.
Still not sure if this is the correct way of doing it however.
Having the same issue here, get the 403 unless the "block public access" is disabled.
Having the same issue here, get the 403 unless the "block public access" is disabled.
Please let us know if you get to any solution (-:
I am having the same issue. Using the same access key id and secret key id from awscli works perfectly but not in s3direct.
For me trick was to change acl
to private
in S3DIRECT_DESTINATIONS
. By default it's set to public-read
which caused AWS to give 403
when public access was blocked.
S3DIRECT_DESTINATIONS = {
'foo': {
'key': "bar"
'acl': 'private',
}
In AWS bucket policy:
{
"Version": "2012-10-17",
"Id": "Policy1608061041543",
"Statement": [
{
"Sid": "Stmt1608061039031",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::$USER_ID:user/$USER_NAME"
},
"Action": [
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::$BUCKET_NAME/*"
}
]
}
In CORS:
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"POST",
"DELETE",
"HEAD",
"PUT"
],
"AllowedOrigins": [
"http://localhost:5000"
],
"ExposeHeaders": [
"ETag",
"x-amz-server-side-encryption"
],
"MaxAgeSeconds": 0
}
]
Changing the ACL between public/private made no difference for me. Just can't figure out what's causing the 403s.
Hello. I'm having an issue when uploading my video from the django admin.
My IAM user has the
AmazonS3FullAccess
policy attached. I also tried creating a new user with the same policy as the one stated inreadme.md
.However I get the same 403 error everytime.
I did eventually get a successful upload when I changed the
Block public access
in my bucket settings to false. That however ment that everyone could upload to my bucket.Can you what i'm doing wrong?
In the browser console I get the following errors:
models.py
settings.py