Skip to content

Use session.NewSession in order to use AssumeRoleWithWebIdentity #1803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pkg/chunk/aws/dynamodb_storage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -861,5 +861,5 @@ func awsSessionFromURL(awsURL *url.URL) (client.ConfigProvider, error) {
return nil, err
}
config = config.WithMaxRetries(0) // We do our own retries, so we can monitor them
return session.New(config), nil
return session.NewSession(config)
}
6 changes: 5 additions & 1 deletion pkg/chunk/aws/s3_storage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ func NewS3ObjectClient(cfg StorageConfig, schemaCfg chunk.SchemaConfig) (chunk.O
s3Config = s3Config.WithS3ForcePathStyle(cfg.S3ForcePathStyle) // support for Path Style S3 url if has the flag

s3Config = s3Config.WithMaxRetries(0) // We do our own retries, so we can monitor them
s3Client := s3.New(session.New(s3Config))
sess, err := session.NewSession(s3Config)
if err != nil {
return nil, err
}
s3Client := s3.New(sess)
bucketNames := []string{strings.TrimPrefix(cfg.S3.URL.Path, "/")}
if cfg.BucketNames != "" {
bucketNames = strings.Split(cfg.BucketNames, ",") // comma separated list of bucket names
Expand Down