Get In Touch
TC 73/1214,Enchakal
Vallakadavu(PO), Thiruvananthapuram,
Kerala- 695008.

An error occurred (AccessDenied) when calling the PutObject operation: Access Denied

Django + DRF + Django-Storages + S3

Exception:
An error occurred (AccessDenied) when calling the PutObject operation: Access Denied

 

For this to work in your application, click ‘Add CORS Configuration’ and enter the following XML:

<code><?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <CORSRule>
        <AllowedOrigin>yourdomain.com</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>
</code>

Add policy as for bucket as well.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "s3:PutObject",
        "s3:PutObjectAcl"
      ],
      "Resource": [
        "arn:aws:s3:::foo/bar*"
      ],
      "Effect": "Allow",
      "Principal": "*"
    }
  ]
}

 

This website stores cookies on your computer.

START A CONVERSATION

Please enable JavaScript in your browser to complete this form.

Junior Scrum Master

Business Development Executive

Business Operation Analyst

Senior Python Django Developer

Technical Project Manager

React JS Developer

MBA Fresher Recruitment ( 2022 & 2023 passed out)