fix(inputs.cloudwatch): Verify endpoint is not nil (#12677)

This commit is contained in:
Joshua Powers 2023-02-15 13:00:58 -07:00 committed by GitHub
parent ecfd367a46
commit c37b5871ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -193,7 +193,10 @@ func (c *CloudWatch) initializeCloudWatch() error {
}
c.client = cwClient.NewFromConfig(awsCreds, func(options *cwClient.Options) {
options.EndpointResolver = customResolver
if customResolver != nil {
options.EndpointResolver = customResolver
}
options.ClientLogMode = 0
options.HTTPClient = &http.Client{
// use values from DefaultTransport