Skip to content

Use the S3 bucket's region vs the client's #763

Answered by ysaito1001
celaus asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @celaus, thank you for reporting this! Could you share with us a self-contained example so we can run it on our end (possibly with tailoring) to reproduce what you are seeing? Also, could you let us know what version of the aws-sdk-s3 crate you're on?

Edit:
In the meantime, I believe I have reproduced what you reported. If I have a bucket in the us-east-1 region and run the following code

#[tokio::main]
async fn main() -> Result<(), Error> {
    let shared_config = aws_config::from_env().load().await; // default region is set to us-west-2
    let s3_client = aws_sdk_s3::Client::new(&shared_config);
    s3_client
        .get_bucket_acl()
        .bucket("name-of-bucket-in-us-east-1")

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@celaus
Comment options

@rcoh
Comment options

@celaus
Comment options

Answer selected by celaus
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants