GithubHelp home page GithubHelp logo

Comments (3)

lalyos avatar lalyos commented on May 17, 2024

I was thinking about making the region optional, and use the GetBucketLocation() minio client call to figure it out.

But it seems that isn't working either. I was trying to get the bucket location with:

  • aws cli
  • a small go program using mini-go

aws cli returns the correct location, even when talking to the wrong endpoint, while the mini-go client
responds wrongly with the same region as the endpoint is:

$ AWS_DEFAULT_REGION=eu-west-1 aws s3api get-bucket-location --bucket $BUCKET
{
    "LocationConstraint": "eu-central-1"
}

$ go run main.go
location: eu-west-1 

Here is my minio-go tester code:

package main

import (
        "fmt"
        "os"

        "github.com/minio/minio-go/v6"
        "github.com/minio/minio-go/v6/pkg/credentials"
)

func main() {
        client, _ := minio.NewWithOptions("s3.eu-west-1.amazonaws.com", &minio.Options{
                Creds: credentials.NewEnvAWS(),
        })
        bl, _ := client.GetBucketLocation(os.Getenv("BUCKET"))
        fmt.Println("location:", bl)
}

from backup-restore-operator.

mrajashree avatar mrajashree commented on May 17, 2024

Hi @lalyos thanks for taking a look into the cause of the bug. We decided to use the minio client because it seems to work for other s3 compatible stores too, whereas there were some problems with using the s3 go client.

from backup-restore-operator.

github-actions avatar github-actions commented on May 17, 2024

This issue/PR has been automatically marked as stale because it has not had activity (commit/comment/label) for 60 days. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

from backup-restore-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.