Description
Hello,
Can you please extend support for S3 by letting the user specify a prefix for the large objects to be put in S3. This means we don't have to dedicate a bucket explicitly for one service - especially when we're overlaying IAM policies for the access to the object store.
Current implementation is:
ExtendedClientConfiguration extendedClientConfig = new ExtendedClientConfiguration()
.withLargePayloadSupportEnabled(s3, s3BucketName);
Would be nice if we could do:
ExtendedClientConfiguration extendedClientConfig = new ExtendedClientConfiguration()
.withLargePayloadSupportEnabled(s3, s3BucketName, s3PrefixPattern);
Where pattern may contain:
- A complete string
It would be nice if this also supported expansion of some predefined variables, such as sprintf values:
%{y} - four digit year
%{m} - two digit month
%{d} - two digit day of month
%{aws::accountumber} - aws account number (in the case of a cross-account bucket being used)
%{aws::rolename} - IAM role name
Hence we can make prefix a string like:
"LARGE_MESSAGES/%{y}/%{m}/%{d}/%{aws::rolename}/"
I can then give the appropriate role the ability to CreateObject at that location, and any roles that read from it the ability to GetObject and DeleteObject (but not create or list).