Skip to content

Commit

Permalink
Ensure -dynamodb.url is set when calling NewTableClient() in aws mode
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Pracucci <marco@pracucci.com>
  • Loading branch information
Marco Pracucci authored and pracucci committed Jul 7, 2019
1 parent 561033f commit a02dfe4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/chunk/storage/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ func NewTableClient(name string, cfg Config) (chunk.TableClient, error) {
case "inmemory":
return chunk.NewMockStorage(), nil
case "aws", "aws-dynamo":
if cfg.AWSStorageConfig.DynamoDB.URL == nil {
return nil, fmt.Errorf("Must set -dynamodb.url in aws mode")
}
path := strings.TrimPrefix(cfg.AWSStorageConfig.DynamoDB.URL.Path, "/")
if len(path) > 0 {
level.Warn(util.Logger).Log("msg", "ignoring DynamoDB URL path", "path", path)
Expand Down

0 comments on commit a02dfe4

Please sign in to comment.