- 최신
- 최다 투표
- 가장 많은 댓글
You need to make sure that whichever IAM user/role is being used in this application, that IAM user/role has following permissions at least:
Actions:
s3:PutObject
s3:GetObject
Resource: arn:aws:s3:::<bucket_name>/<folder>/* or arn:aws:s3:::<bucket_name>/* <-- Based on your needs
Action: s3:listBucket
Resources: arn:aws:s3:::<bucket_name>
Policy that needs to be added to your IAM user/role would look like as below:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::<bucket_name>"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject"
]
"Resource": "arn:aws:s3:::<bucket_name>/*"
}
]
}
Hope this helps.
Comment here if you have additional questions, happy to help.
Abhishek
Hi, I'm facing the same problem secondabhi, I'm create a Django project, deploy in an EC2 and it was working perfectly
But now, I'm trying to change somethings in my project and I'm receiving this same error
I've set this bucket policy as bellow and I try your too, but no one works
{ "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "", "Action": "s3:", "Resource": "arn:aws:s3:::ecommerces3/*" } ] }
I'm really stuck on this one
Sir your solution is not working. It is throwing the same error
Can you please add snapshot of your role permissions which is being used by this application.
I have created the (inline)policy given by you named "joyguruerpolicy" in the IAM user. and there bucket is private and I have not set any bucket policies and cors policy also. I am attaching a google drive link here that you can access the snapshots.link-https://drive.google.com/drive/folders/1euVNMOBMx74ueLASihHJWkLr47ayPxIl