[Fixes #81965260] Cleanup S3 code