I'm pushing files to an S3 bucket and the bucket owner cannot see the files while my role is granted access to write to the bucket. I'm not sure why this is and was hoping I would have to programatically force bucket-owner-full-control.
ObjectMetadata metadata = constructMetadata();
PutObjectRequest request = new PutObjectRequest(bucketName, filename, data, metadata);
s3Supplier.get().putObject(request);
It uploads successfully, but not seen by the bucket owner. Any reason as to why this would be?
PutObjectRequest request = new PutObjectRequest(bucketName, filename, data, metadata).withCannedAcl(CannedAccessControlList.BucketOwnerFullControl); ObjectMetadata metadata = constructMetadata(); PutObjectRequest request = new PutObjectRequest(bucketName, filename, data, metadata); s3Supplier.get().putObject(request);Inspired by the answer
S3 objects are owned by the AWS account that writes them. Clean By default, only the owner of the object has all privileges on the object, and others, including the bucket owner, cannot access it unless access is granted (via ACL).