Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pkg/aws/sts/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ type regionalResolver struct {
}

func (r *regionalResolver) EndpointFor(svc, region string, opts ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
return r.endpoint, nil
if svc == "sts" {
return r.endpoint, nil
}

return endpoints.DefaultResolver().EndpointFor(svc, region, opts...)
}

func newRegionalResolver(region string) (endpoints.Resolver, error) {
Expand Down Expand Up @@ -81,7 +85,7 @@ type DefaultSTSGateway struct {
}

func DefaultGateway(assumeRoleArn, region string) (*DefaultSTSGateway, error) {
config := aws.NewConfig().WithCredentialsChainVerboseErrors(true)
config := aws.NewConfig().WithCredentialsChainVerboseErrors(true)
if assumeRoleArn != "" {
config.WithCredentials(stscreds.NewCredentials(session.Must(session.NewSession()), assumeRoleArn))
}
Expand Down