what is the recommended way to delete an object (d...
# ask-the-community
a
what is the recommended way to delete an object (directory) in S3 bucket?
k
You can delete it, we are adding a cache delete api too
a
via FLyteDirectory?
k
You can delete and change cache version
a
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?
k
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
a
i.e. how do i execute this inside a task aws s3 rm s3://<bucket-name>/<path> --recursive
k
And then you can simply set bucket policies
You can use file system to get a handle of fsspec or the data subsystem
a
ok thx
i guess i can use shell_task?
k
Or python
Also create an issue we can add these apis to flytefile / dir