diff --git a/peridot/yumrepofs/v1/BUILD.bazel b/peridot/yumrepofs/v1/BUILD.bazel index 3b2a4511..84bb94fb 100644 --- a/peridot/yumrepofs/v1/BUILD.bazel +++ b/peridot/yumrepofs/v1/BUILD.bazel @@ -19,6 +19,7 @@ go_library( "//utils", "//vendor/github.com/aws/aws-sdk-go/aws", "//vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds", + "//vendor/github.com/aws/aws-sdk-go/aws/endpoints", "//vendor/github.com/aws/aws-sdk-go/aws/session", "//vendor/github.com/aws/aws-sdk-go/service/s3", "//vendor/github.com/go-git/go-billy/v5/osfs", diff --git a/peridot/yumrepofs/v1/server.go b/peridot/yumrepofs/v1/server.go index b062f4d4..d08c3db2 100644 --- a/peridot/yumrepofs/v1/server.go +++ b/peridot/yumrepofs/v1/server.go @@ -34,6 +34,7 @@ import ( "context" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" + "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/session" awss3 "github.com/aws/aws-sdk-go/service/s3" "github.com/go-git/go-billy/v5/osfs" @@ -66,7 +67,9 @@ func NewServer(db peridotdb.Access, session *session.Session) (*Server, error) { return nil, err } - cfg := &aws.Config{} + cfg := &aws.Config{ + UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled, + } if assumeRole := viper.GetString("s3-assume-role"); assumeRole != "" { cfg.Credentials = stscreds.NewCredentials(session, assumeRole) }