The important part of the error is this:
EXCEPTION: Compliance for object does not allow deletion
aws-sdk-s3/client.rb:471:in `complete_multipart_upload'
aws-sdk-s3/multipart_file_uploader.rb:56:in `complete_upload'
aws-sdk-s3/multipart_file_uploader.rb:45:in `upload'
It fails to finish the multipart upload because there’s probably some sort of policy or object lock that prevents deletion of uploaded parts.