Skip to content

S3 service root and region not effective #3006

Closed Answered by Xuanwo
zooeywm asked this question in Q&A
Discussion options

You must be logged in to vote

Please don't call builder.build? directly, it will take and consume builder itself. Instead:

let mut builder = S3::default();
builder
    .endpoint(endpoint)
    .root(&format!("storage-{}", storage_server_id))
    .bucket(bucket)
    .region(region)
    .access_key_id(access_key_id)
    .secret_access_key(secret_access_key)
    .allow_anonymous();
Ok(Operator::new(builder)?.finish())

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zooeywm
Comment options

Answer selected by zooeywm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants