How do you make an S3 object public via the AWS Java SDK?
Specifically, what API methods via the Java AWS SDK can be used to make an Object public when its uploaded?
An alternative approach which allows for more finegrained control of who exactly is allowed to view the object (all users or authenticated users only):
PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, keyName, image);
AccessControlList acl = new AccessControlList();
acl.grantPermission(GroupGrantee.AllUsers, Permission.Read); //all users or authenticated
putObjectRequest.setAccessControlList(acl);
s3client.putObject(putObjectRequest);