Using s3cmd put instead cp.
Fixed the compact function.