I am new to AWS. I am setting up an S3 bucket that I want to use to store media files for a Django App I am developing.
I am logged in as the person who created the AWS account, but when I click on the permissions tab and then try to edit the bucket policy I am getting a message that states "You don't have permissions to edit bucket policy".
I am following a guide which describes the configuration for Django setup, but my understanding is that the purpose of doing this is to allow public read access to the files. I was able to set the CORS policy without any problems.
I created an IAM user logged in as them and it still gives errors. That IAM user has permissions to all S3 Buckets. The error states "After you or your AWS administrator have updated your permissions to allow the s3:PutBucketPolicy action, choose Save changes."
I went to the policy applied to the bucket and it has this permission. Here is the JSON.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": "mybucketARN"
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": "mybucketARN"
}
]
}
It was necessary to enable public access on the bucket and then I was able to save the bucket policy.
This is the policy I was adding.