We have very many folder and subfolders in each S3 bucket where parquet files are stored, issue is when data error occurs, we have to manually go in to each folder/subfolder/sub-subfolder etc to delete all the parquet files.
Is there a way either via a) AWS cli or b) using a py-script and running it in a AWS Glue jobs that it could delete all parquet files in multiple sub and sub-sub folders?
Option b) would be great, and ideally a script that runs without having to specify the subfolder. Our folder structure is set, so if script needed paths to all subfolders, we could live with that solution also.
Thanks in advance!