https://flyte.org logo
#ask-the-community
Title
# ask-the-community
a

Alex Lyashok

01/12/2024, 4:01 PM
what is the recommended way to delete an object (directory) in S3 bucket?
k

Ketan (kumare3)

01/12/2024, 4:07 PM
You can delete it, we are adding a cache delete api too
a

Alex Lyashok

01/12/2024, 4:08 PM
via FLyteDirectory?
k

Ketan (kumare3)

01/12/2024, 4:08 PM
You can delete and change cache version
a

Alex Lyashok

01/12/2024, 4:09 PM
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

Ketan (kumare3)

01/12/2024, 4:10 PM
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

Alex Lyashok

01/12/2024, 4:10 PM
i.e. how do i execute this inside a task aws s3 rm s3://<bucket-name>/<path> --recursive
k

Ketan (kumare3)

01/12/2024, 4:10 PM
And then you can simply set bucket policies
You can use file system to get a handle of fsspec or the data subsystem
a

Alex Lyashok

01/12/2024, 4:11 PM
ok thx
i guess i can use shell_task?
k

Ketan (kumare3)

01/12/2024, 4:11 PM
Or python
Also create an issue we can add these apis to flytefile / dir
2 Views