Merge pull request #14746 from jaken551/master

14722 - removing unnecessary arn check that breaks assume role featur…
This commit is contained in:
Torkel Ödegaard 2019-01-07 16:49:35 +01:00 committed by GitHub
commit 56edba5a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ package cloudwatch
import (
"fmt"
"os"
"strings"
"sync"
"time"
@ -43,7 +42,7 @@ func GetCredentials(dsInfo *DatasourceInfo) (*credentials.Credentials, error) {
secretAccessKey := ""
sessionToken := ""
var expiration *time.Time = nil
if dsInfo.AuthType == "arn" && strings.Index(dsInfo.AssumeRoleArn, "arn:aws:iam:") == 0 {
if dsInfo.AuthType == "arn" {
params := &sts.AssumeRoleInput{
RoleArn: aws.String(dsInfo.AssumeRoleArn),
RoleSessionName: aws.String("GrafanaSession"),