Skip to content

Unable to list s3 objects #1059

@lightjacket

Description

@lightjacket

Describe the bug

I am attempting to list objects in an s3 bucket with a prefix as so (note the redacted bucket, prefix, and access keys). I get an error when running this code.

#[tokio::test]
    async fn list_objects() {
        let client = aws_sdk_s3::Client::new(&aws_config::ConfigLoader::default()
            .credentials_provider(Credentials::new(
                "***",
                "***",
                Some("***".to_string()),
                None,
                "testing"
            ))
            .behavior_version(BehaviorVersion::latest())
            .load()
            .await);
        let results = client
            .list_objects_v2()
            .bucket("***")
            .prefix("***")
            .send()
            .await
            .expect("results");
        eprintln!("results = {:?}", results);
    }

Expected Behavior

I expected to see a list of objects. When I run against a local minio server I am able to successfully list objects.

Current Behavior

Currently I see this error:

results: DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeSigning, interceptor_name: Some("UserAgentInterceptor"), source: Some(MissingApiMetadata) }, connection: Unknown } })

Reproduction Steps

Run the test case above.

Possible Solution

No response

Additional Information/Context

No response

Version

├── aws-config v1.1.2
│   ├── aws-credential-types v1.1.5
│   │   ├── aws-smithy-async v1.1.5
│   │   ├── aws-smithy-runtime-api v1.1.5
│   │   │   ├── aws-smithy-async v1.1.5 (*)
│   │   │   ├── aws-smithy-types v1.1.5
│   │   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-http v0.60.2
│   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-types v1.1.5
│   │   │   ├── aws-credential-types v1.1.5 (*)
│   │   │   ├── aws-smithy-async v1.1.5 (*)
│   │   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   │   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-runtime v1.1.5
│   │   ├── aws-credential-types v1.1.5 (*)
│   │   ├── aws-sigv4 v1.1.5
│   │   │   ├── aws-credential-types v1.1.5 (*)
│   │   │   ├── aws-smithy-eventstream v0.60.4
│   │   │   │   ├── aws-smithy-types v1.1.5 (*)
│   │   │   ├── aws-smithy-http v0.60.5
│   │   │   │   ├── aws-smithy-eventstream v0.60.4 (*)
│   │   │   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   │   │   ├── aws-smithy-types v1.1.5 (*)
│   │   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-smithy-async v1.1.5 (*)
│   │   ├── aws-smithy-eventstream v0.60.4 (*)
│   │   ├── aws-smithy-http v0.60.5 (*)
│   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-types v1.1.5 (*)
│   ├── aws-sdk-sso v1.10.0
│   │   ├── aws-credential-types v1.1.5 (*)
│   │   ├── aws-http v0.60.2 (*)
│   │   ├── aws-runtime v1.1.5 (*)
│   │   ├── aws-smithy-async v1.1.5 (*)
│   │   ├── aws-smithy-http v0.60.5 (*)
│   │   ├── aws-smithy-json v0.60.5
│   │   │   └── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-smithy-runtime v1.1.5
│   │   │   ├── aws-smithy-async v1.1.5 (*)
│   │   │   ├── aws-smithy-http v0.60.5 (*)
│   │   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-types v1.1.5 (*)
│   ├── aws-sdk-ssooidc v1.10.0
│   │   ├── aws-credential-types v1.1.5 (*)
│   │   ├── aws-http v0.60.2 (*)
│   │   ├── aws-runtime v1.1.5 (*)
│   │   ├── aws-smithy-async v1.1.5 (*)
│   │   ├── aws-smithy-http v0.60.5 (*)
│   │   ├── aws-smithy-json v0.60.5 (*)
│   │   ├── aws-smithy-runtime v1.1.5 (*)
│   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-types v1.1.5 (*)
│   ├── aws-sdk-sts v1.10.0
│   │   ├── aws-credential-types v1.1.5 (*)
│   │   ├── aws-http v0.60.2 (*)
│   │   ├── aws-runtime v1.1.5 (*)
│   │   ├── aws-smithy-async v1.1.5 (*)
│   │   ├── aws-smithy-http v0.60.5 (*)
│   │   ├── aws-smithy-json v0.60.5 (*)
│   │   ├── aws-smithy-query v0.60.3
│   │   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-smithy-runtime v1.1.5 (*)
│   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-smithy-xml v0.60.3
│   │   ├── aws-types v1.1.5 (*)
│   ├── aws-smithy-async v1.1.5 (*)
│   ├── aws-smithy-http v0.60.5 (*)
│   ├── aws-smithy-json v0.60.5 (*)
│   ├── aws-smithy-runtime v1.1.5 (*)
│   ├── aws-smithy-runtime-api v1.1.5 (*)
│   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-types v1.1.5 (*)
├── aws-sdk-athena v1.10.0
│   ├── aws-credential-types v1.1.5 (*)
│   ├── aws-http v0.60.2 (*)
│   ├── aws-runtime v1.1.5 (*)
│   ├── aws-smithy-async v1.1.5 (*)
│   ├── aws-smithy-http v0.60.5 (*)
│   ├── aws-smithy-json v0.60.5 (*)
│   ├── aws-smithy-runtime v1.1.5 (*)
│   ├── aws-smithy-runtime-api v1.1.5 (*)
│   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-types v1.1.5 (*)
├── aws-sdk-glue v1.12.0
│   ├── aws-credential-types v1.1.5 (*)
│   ├── aws-http v0.60.2 (*)
│   ├── aws-runtime v1.1.5 (*)
│   ├── aws-smithy-async v1.1.5 (*)
│   ├── aws-smithy-http v0.60.5 (*)
│   ├── aws-smithy-json v0.60.5 (*)
│   ├── aws-smithy-runtime v1.1.5 (*)
│   ├── aws-smithy-runtime-api v1.1.5 (*)
│   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-types v1.1.5 (*)
├── aws-sdk-s3 v1.12.0
│   ├── aws-credential-types v1.1.5 (*)
│   ├── aws-http v0.60.2 (*)
│   ├── aws-runtime v1.1.5 (*)
│   ├── aws-sigv4 v1.1.5 (*)
│   ├── aws-smithy-async v1.1.5 (*)
│   ├── aws-smithy-checksums v0.60.3
│   │   ├── aws-smithy-http v0.60.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-smithy-eventstream v0.60.4 (*)
│   ├── aws-smithy-http v0.60.5 (*)
│   ├── aws-smithy-json v0.60.5 (*)
│   ├── aws-smithy-runtime v1.1.5 (*)
│   ├── aws-smithy-runtime-api v1.1.5 (*)
│   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-smithy-xml v0.60.3 (*)
│   ├── aws-types v1.1.5 (*)
├── aws-config v1.1.2 (*)
├── aws-sdk-s3 v1.12.0 (*)
├── aws-config v1.1.2 (*)
├── aws-sdk-dynamodb v1.14.0
│   ├── aws-credential-types v1.1.5 (*)
│   ├── aws-runtime v1.1.5 (*)
│   ├── aws-smithy-async v1.1.5 (*)
│   ├── aws-smithy-http v0.60.5 (*)
│   ├── aws-smithy-json v0.60.5 (*)
│   ├── aws-smithy-runtime v1.1.5 (*)
│   ├── aws-smithy-runtime-api v1.1.5 (*)
│   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-types v1.1.5 (*)

Environment details (OS name and version, etc.)

Ubuntu 22.04

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions