Browse Source

Cloudwatch: Fix bug with obtaining IAM roles within ECS containers. (#8766)

Fixes #8750.
gomlgs 8 years ago
parent
commit
228c210379
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/api/cloudwatch/cloudwatch.go

+ 1 - 1
pkg/api/cloudwatch/cloudwatch.go

@@ -166,7 +166,7 @@ func getCredentials(dsInfo *datasourceInfo) (*credentials.Credentials, error) {
 				SecretAccessKey: dsInfo.SecretKey,
 				SecretAccessKey: dsInfo.SecretKey,
 			}},
 			}},
 			&credentials.SharedCredentialsProvider{Filename: "", Profile: dsInfo.Profile},
 			&credentials.SharedCredentialsProvider{Filename: "", Profile: dsInfo.Profile},
-			&ec2rolecreds.EC2RoleProvider{Client: ec2metadata.New(sess), ExpiryWindow: 5 * time.Minute},
+			remoteCredProvider(sess),
 		})
 		})
 
 
 	credentialCacheLock.Lock()
 	credentialCacheLock.Lock()