Problem:
- Enabling InstructionFileConfiguration
- Uploading a file of just some few bytes (i.e. 24 bytes)
- Set the contentLength in the original upload
PutObjectRequest
PutObjectRequest putObjectRequest = PutObjectRequest.builder().bucket(bucket).contentLength((long) content.length).key(objectKey).build();
- The checksum validation fails - The
PutObjectRequest for the instruction file is created from the original PutObjectRequest as a foundation. Bug - The contentLength of the original request has been set to the instruction file PutObjectRequest to 24 bytes until the point of upload. - the uploaded instruction files content looks like this {"x-amz-tag-len":"128"," (Uploaded with disabled checksum validation)
Solution:
Reset the contentLength of the InstructionFiles PutObjectRequest to null or the calculated InstructionFile length.