I have an Account A
uploading objects to a S3 bucket in Account B
. The objects are read by Account C
.
To provide Account C the permission to access these objects, I have to add its canonical ID to ACL of the objects. I am trying to do this in yml, but is there a better way to specify the canonical id other than hardcoding its value ?
acl.grantPermission(new CanonicalGrantee( "29a4a34fg7b381fe444fca8404032f2cb1sdgsd216d7098a2sgsdg7b0ab28cbd84gh4y"), Permission.Read);