How to share files in S3 across tags within a tenant?


By default, the mount path on S3 for a tenant/tag is something like:

That way, things are compartmentalized and files of one tag cannot be accessed from another tag.
However, is it possible, and if so, how, to move/copy files from one tag to another?
I would imagine a “default pseudo-tag” to do the buffer, like s3://bucket-name/fs/tenant/share/



I’m not sure I understand the question but you should be able to copy files under one mount to another without any issues. Does not FileSystem.copyFiles not work?


No, if I run:

SystemFile.copyFiles('s3://bucket-name/fs/tenant/tag1/someFiles/', 's3://bucket-name/fs/tenant/tag2/someFiles/')

from tag1, I get an error 500:

Invalid or inaccessible URL "s3://bucket-name/fs/tenant/tag2/someFiles/"

Maybe it is a problem of permissions… (I have Developer role)


@CamilleM by default one tag can not access data / files from another tag. You will need to add a new mount that is available in both tags e.g.

S3.config().setMount(''"TENANT", "${owner}--${env}-${pod}/shared/${tenant}/")

assuming there no tag named shared you can use this mount to access the same set of files from two different tags.