Skip to content

Requests with no body don't sign correctly #567

@lucix-aws

Description

@lucix-aws

Describe the bug

S3Client.createBucket, when called with only a bucket name as input, appears to be signing incorrectly. The service will reject the request claiming that the signature is invalid.

Expected behavior

Bucket should be created.

Current behavior

S3Exception is thrown: The request signature we calculated does not match the signature you provided. Check your key and signing method.

Steps to Reproduce

fun main():Unit = runBlocking {
    S3Client.fromEnvironment().use { s3 ->
        s3.createBucket { bucket = "buckettestdgttxcq" }

        s3.listBuckets {}.buckets?.forEach {
            println(it.name)
        }
    }
}

Possible Solution

No response

Context

No response

AWS Kotlin SDK version used

0.14.0-beta

Platform (JVM/JS/Native)

JVM

Operating System and version

macOS 12.2.1

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions