what is the recommended way to delete an object (d...
# flyte-support
n
what is the recommended way to delete an object (directory) in S3 bucket?
f
You can delete it, we are adding a cache delete api too
n
via FLyteDirectory?
f
You can delete and change cache version
n
i just have my own remote in the bucket and need to delete it - i was hoping i can just rely on FLyDreictory or FlyteFile to do file ops do i need to use boto3 or some other way to operate on files that arenot inpuits/outputs?
f
Ohh that way, ya, today there is no delete api on Flytedir and file, please contribute. Nobody every wants it as Flyte is immutable - but I like your idea
n
i.e. how do i execute this inside a task aws s3 rm s3://<bucket-name>/<path> --recursive
f
And then you can simply set bucket policies
You can use file system to get a handle of fsspec or the data subsystem
n
ok thx
i guess i can use shell_task?
f
Or python
Also create an issue we can add these apis to flytefile / dir