Fixed s3 upload related bugs.
Merge branch 'test' into dev