Skip to content

Unable to put/get s3 object where key=" " (space) #1216

@nberrington-cloudian

Description

@nberrington-cloudian

Describe the bug

When trying to put/get an s3 object with key=" " (single space character) the sdk returns the following error:

Unhandled(Unhandled { source: ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ReadBeforeExecution, interceptor_name: Some("GetObjectEndpointParamsInterceptor"), source: Some(BuildError { kind: MissingField { field: "key", details: "A required field was not set" } }) } }), meta: ErrorMetadata { code: None, message: None, extras: None } })

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

As I am able to put/get objects with key=" " using the awscli, I should be able to do the same using the rust sdk.

Current Behavior

Unable to put/get object with key=" "

Reproduction Steps

   let result = s3client
        .put_object()
        .bucket("foo")
        .key(" ")
        .body(ByteStream::from_static("bar".as_bytes()))
        .send()
        .await?;

Possible Solution

No response

Additional Information/Context

No response

Version

$ cargo tree | grep aws
├── aws-config v1.5.10
│   ├── aws-credential-types v1.2.1
│   │   ├── aws-smithy-async v1.2.1
│   │   ├── aws-smithy-runtime-api v1.7.3
│   │   │   ├── aws-smithy-async v1.2.1 (*)
│   │   │   ├── aws-smithy-types v1.2.9
│   │   ├── aws-smithy-types v1.2.9 (*)
│   ├── aws-runtime v1.4.3
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-sigv4 v1.2.5
│   │   │   ├── aws-credential-types v1.2.1 (*)
│   │   │   ├── aws-smithy-eventstream v0.60.5
│   │   │   │   ├── aws-smithy-types v1.2.9 (*)
│   │   │   ├── aws-smithy-http v0.60.11
│   │   │   │   ├── aws-smithy-eventstream v0.60.5 (*)
│   │   │   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   │   │   ├── aws-smithy-types v1.2.9 (*)
│   │   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   │   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-smithy-async v1.2.1 (*)
│   │   ├── aws-smithy-eventstream v0.60.5 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-runtime v1.7.3
│   │   │   ├── aws-smithy-async v1.2.1 (*)
│   │   │   ├── aws-smithy-http v0.60.11 (*)
│   │   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   │   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-types v1.3.3
│   │   │   ├── aws-credential-types v1.2.1 (*)
│   │   │   ├── aws-smithy-async v1.2.1 (*)
│   │   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   │   ├── aws-smithy-types v1.2.9 (*)
│   ├── aws-sdk-sso v1.49.0
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-runtime v1.4.3 (*)
│   │   ├── aws-smithy-async v1.2.1 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-json v0.60.7
│   │   │   └── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-smithy-runtime v1.7.3 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-types v1.3.3 (*)
│   ├── aws-sdk-ssooidc v1.50.0
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-runtime v1.4.3 (*)
│   │   ├── aws-smithy-async v1.2.1 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-json v0.60.7 (*)
│   │   ├── aws-smithy-runtime v1.7.3 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-types v1.3.3 (*)
│   ├── aws-sdk-sts v1.50.0
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-runtime v1.4.3 (*)
│   │   ├── aws-smithy-async v1.2.1 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-json v0.60.7 (*)
│   │   ├── aws-smithy-query v0.60.7
│   │   │   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-smithy-runtime v1.7.3 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-smithy-xml v0.60.9
│   │   ├── aws-types v1.3.3 (*)
│   ├── aws-smithy-async v1.2.1 (*)
│   ├── aws-smithy-http v0.60.11 (*)
│   ├── aws-smithy-json v0.60.7 (*)
│   ├── aws-smithy-runtime v1.7.3 (*)
│   ├── aws-smithy-runtime-api v1.7.3 (*)
│   ├── aws-smithy-types v1.2.9 (*)
│   ├── aws-types v1.3.3 (*)
├── aws-sdk-s3 v1.62.0
│   ├── aws-credential-types v1.2.1 (*)
│   ├── aws-runtime v1.4.3 (*)
│   ├── aws-sigv4 v1.2.5 (*)
│   ├── aws-smithy-async v1.2.1 (*)
│   ├── aws-smithy-checksums v0.60.13
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-types v1.2.9 (*)
│   ├── aws-smithy-eventstream v0.60.5 (*)
│   ├── aws-smithy-http v0.60.11 (*)
│   ├── aws-smithy-json v0.60.7 (*)
│   ├── aws-smithy-runtime v1.7.3 (*)
│   ├── aws-smithy-runtime-api v1.7.3 (*)
│   ├── aws-smithy-types v1.2.9 (*)
│   ├── aws-smithy-xml v0.60.9 (*)
│   ├── aws-types v1.3.3 (*)
├── aws-smithy-runtime-api v1.7.3 (*)
│   ├── aws-credential-types v1.2.1 (*)
│   ├── aws-sdk-iam v1.52.0
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-runtime v1.4.3 (*)
│   │   ├── aws-smithy-async v1.2.1 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-json v0.60.7 (*)
│   │   ├── aws-smithy-query v0.60.7 (*)
│   │   ├── aws-smithy-runtime v1.7.3 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-smithy-xml v0.60.9 (*)
│   │   ├── aws-types v1.3.3 (*)
│   ├── aws-sigv4 v1.2.5 (*)
│   ├── aws-smithy-types v1.2.9 (*)
│   │   ├── aws-smithy-types v1.2.9 (*)
    ├── aws-config v1.5.10 (*)
    ├── aws-credential-types v1.2.1 (*)
    ├── aws-sdk-s3 v1.62.0 (*)
    ├── aws-smithy-runtime-api v1.7.3 (*)
    │   │   │   ├── aws-credential-types v1.2.1 (*)
    │   │   │   ├── aws-sdk-iam v1.52.0 (*)
    │   │   │   ├── aws-sdk-s3 v1.62.0 (*)
    │   │   │   ├── aws-sigv4 v1.2.5 (*)
    │   │   │   ├── aws-smithy-types v1.2.9 (*)
    │   ├── aws-credential-types v1.2.1 (*)

Environment details (OS name and version, etc.)

linux x64

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions