Skip to content

Commit

Permalink
Increase DescribeParameters batch size to 50
Browse files Browse the repository at this point in the history
DescribeParameters' default batch size is 10, but the API supports a batch size
up to 50. Increasing it to 50 reduces the number of requests made to
Parameter Store.

This should help reducing the likelyhood of getting rate limited by AWS
(we are currently running into "ThrottlingException: Rate exceeded"
every time we deploy)
  • Loading branch information
arthens committed Dec 6, 2017
1 parent df3773f commit 50d4897
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions store/ssmstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ func (s *SSMStore) List(service string, includeValues bool) ([]Secret, error) {
Values: []*string{aws.String("/" + service)},
},
},
MaxResults: aws.Int64(50),
NextToken: nextToken,
}
} else {
Expand All @@ -277,6 +278,7 @@ func (s *SSMStore) List(service string, includeValues bool) ([]Secret, error) {
Values: []*string{aws.String(service + ".")},
},
},
MaxResults: aws.Int64(50),
NextToken: nextToken,
}
}
Expand Down

0 comments on commit 50d4897

Please sign in to comment.