Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipart Upload request support SSE CPK #1095

Closed
kaiz-io opened this issue Feb 22, 2017 · 2 comments
Closed

Multipart Upload request support SSE CPK #1095

kaiz-io opened this issue Feb 22, 2017 · 2 comments
Labels
bug This issue is a bug.

Comments

@kaiz-io
Copy link

kaiz-io commented Feb 22, 2017

First github issue ever so here we go. Be gentle.

I am experiencing an issue that seems very similar to the ruby version of this sdk that was reported: aws/aws-sdk-ruby#1084

I looked at https://github.com/aws/aws-sdk-go/blob/master/service/s3/api.go#L311 to confirm, but I am just getting into writing in go so I am not quite sure that code is the smoking gun. But it appears to be missing SSE CPK data.

params := &s3manager.UploadInput{
		Bucket:               aws.String(r.BucketName),
		Key:                  aws.String(r.Key),
		Body:                 reader,
		SSECustomerAlgorithm: aws.String("AES256"),
		SSECustomerKey:       aws.String(unEncryptedKey),
		Tagging:              aws.String(v.Encode()),
	}
	resp, err := uploader.Upload(params)
	if err != nil {
		log.Fatal(err)
	}

Error Output:

2017/02/22 14:24:37 MultipartUpload: upload multipart failed
        upload id: <removed for github>
caused by: InvalidRequest: The multipart upload initiate requested encryption. Subsequent part requests must include the appropriate encryption parameters.
        status code: 400, request id: <removed for github>
@xibz xibz added the bug This issue is a bug. label Feb 23, 2017
@xibz
Copy link
Contributor

xibz commented Feb 23, 2017

Hello @zkai, thank you for reaching out to us. I've gone ahead and submitted a PR, #1097, that fixes this. If you have any additional issues, please feel free to reach out to us.

@xibz
Copy link
Contributor

xibz commented Feb 23, 2017

@zkai, we just merged in #1097. If you have any issues with the latest changes, please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants