I am the bucket owner. some of the files in my bucket are not owned by me or dont have full control over it. I will like to have full access to the files. Unfortunately, there is no owner of the file and not able t trace how the files have been uploaded to the bucket.
- How can i overwrite the permissions of the files that are not owned by me in my bucket?
- Going forward, how can i make sure the files uploaded in my bucket that i have full control over it.
I tried copy and paste the files to itself in the same s3 bucket to overwrite the permissions but failed.
This is the bucket policy
{ "Version": "2012-10-17", "Id": "abcd", "Statement": [ { "Sid": "abcd", "Effect": "Allow", "Principal": { "AWS": [ "arn:aws:iam::123456789012:user/xxx" ] }, "Action": [ "s3:GetObject", "s3:GetBucketLocation", "s3:ListBucket", "s3:PutObject", "s3:PutObjectAcl" ], "Resource": [ "arn:aws:s3:::xyz/*", "arn:aws:s3:::xyz" ] } ] }
I want to have access/download to the files not owned by me from my s3 bucket