Safe S3 cleanup after successful Nextflow run on Seqera AWS Batch

I believe it’s expected to use Life cycle rules to clean up cloud caches

Looking for a way to trigger a Nextflow cleanup process (deleting input files) only after the entire workflow completes successfully—any ideas or best practices to handle this efficiently? - #10 by Charles_A_Roy has posted their solution