lundi 24 août 2015

S3ResponseError: 403 Forbidden

I can't upload media files to Amazon S3 using django-storages and boto, and following this tutorial. I've also checked these questions:

boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden

Getting boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden when uploading file

But I am not able to use them successfully. I always get the error: S3ResponseError: 403 Forbidden

My bucket policy is:

{
"Version": "2008-10-17",
"Statement": [
    {
        "Sid": "PublicReadForGetBucketObjects",
        "Effect": "Allow",
        "Principal": {
            "AWS": "*"
        },
        "Action": "s3:GetObject",
        "Resource": "arn:aws:s3:::<bucket name>/*"
    },
    {
        "Sid": "",
        "Effect": "Allow",
        "Principal": {
            "AWS": "<arn info>"
        },
        "Action": "s3:*",
        "Resource": [
            "arn:aws:s3:::<bucket name>",
            "arn:aws:s3:::<bucket name>/*"
        ]
    }
]

}

Any ideas?




Aucun commentaire:

Enregistrer un commentaire