ITADN

Multipart upload fails with invalid request signature

#1543OpenHenryS1 创建于 2026-04-01
H
HenryS1commented
Hello After updating pekko connectors to 1.3.0 and the aws sdk to 2.42.2 (which is the version used by pekko connectors 1.3.0) I get the following error when I try to run a multipart upload. ``` java.util.concurrent.CompletionException: software.amazon.awssdk.services.s3.model.S3Exception: The request signature we calculated does not match the signature you provided. Check your key and signing method. ``` Previously I was on pekko connectors 1.2.0 and aws sdk 2.29.52. I noticed this happening in application code but it also happens if I use the following snippet extracted from S3ITTest.scala in this repository, where I supply my own bucket name and client. ``` val fileContent = (0 to 1000000).mkString val createMultipartUploadResponse = client .createMultipartUpload( CreateMultipartUploadRequest.builder().bucket(bucketName).key("bar").contentType("text/plain").build()) .join() val p1 = client .uploadPart( UploadPartRequest .builder() .bucket(bucketName) .key("bar") .partNumber(1) .uploadId(createMultipartUploadResponse.uploadId()) .build(), AsyncRequestBody.fromString(fileContent)) .join val p2 = client .uploadPart( UploadPartRequest .builder() .bucket(bucketName) .key("bar") .partNumber(2) .uploadId(createMultipartUploadResponse.uploadId()) .build(), AsyncRequestBody.fromString(fileContent)) .join client .completeMultipartUpload( CompleteMultipartUploadRequest .builder() .bucket(bucketName) .key("bar") .uploadId(createMultipartUploadResponse.uploadId()) .multipartUpload( CompletedMultipartUpload .builder() .parts(CompletedPart.builder().partNumber(1).eTag(p1.eTag()).build(), CompletedPart.builder().partNumber(2).eTag(p2.eTag()).build()) .build()) .build()) .join val result = client .getObject(GetObjectRequest.builder().bucket(bucketName).key("bar").build(), AsyncResponseTransformer.toBytes[GetObjectResponse]()) .join ``` The client is constructed like this ``` S3AsyncClient.builder .credentialsProvider(DefaultCredentialsProvider.builder().build()) .region(region) .httpClient(PekkoHttpClient.builder().withActorSystem(system).build()) .build() ``` If I use the netty client instead of the pekko client the request works, but I want to use the pekko client.
0 条评论