I am trying to write a utility using aws-java-sdk (1.11.230). I am able to write a file with SSE-KMS by using PutObjectRequest as follow:
PutObjectRequest putRequest = new PutObjectRequest(existingBucketName, keyName, file)
.withSSEAwsKeyManagementParams(kmsKeyId);
but while trying to upload it in multipart, I could not find any way to specify encryption configuration for SSE-KMS.
Could anyone please suggest a way to go through this successfully. Any suggestion will be appreciated.
Vikash Pareek
Finally, I am able to find the solution for this. It can be done by setting headers to InitiateMultipartUploadRequest object as follow:
Can also be done like this: