Skip to content

s3 presigned request does not work with custom endpoint and no region set #3403

@ibotty

Description

@ibotty

If using an aws-config with custom endpoint, but no region the presigned request is not complete. If setting the region it works allright.

Is that expected? If so it would be great to at least document it or better statically prohibit using it without region.

let aws_config = aws_config::from_env()
    .endpoint_url(...)
    //.region("us-east-1")
    .load()
    .await;
let client = aws_sdk_s3::Client::from_conf(s3_config);
let req = client.get_object()
    .bucket(..)
    .key("test-key")
    .presigned(..)
    .await.unwrap();
assert_eq(req.uri, "/test-key/?x-id=GetObject")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions