Commit 73296717 by Dário Nascimento Committed by GitHub

Cloudwatch: prefer webIdentity over EC2 role (#23452)

parent 3acc318d
......@@ -58,8 +58,8 @@ func (u *S3Uploader) Upload(ctx context.Context, imageDiskPath string) (string,
SecretAccessKey: u.secretKey,
}},
&credentials.EnvProvider{},
remoteCredProvider(sess),
webIdentityProvider(sess),
remoteCredProvider(sess),
})
cfg := &aws.Config{
Region: aws.String(u.region),
......
......@@ -106,8 +106,8 @@ func GetCredentials(dsInfo *DatasourceInfo) (*credentials.Credentials, error) {
SecretAccessKey: dsInfo.SecretKey,
}},
&credentials.SharedCredentialsProvider{Filename: "", Profile: dsInfo.Profile},
remoteCredProvider(sess),
webIdentityProvider(sess),
remoteCredProvider(sess),
})
credentialCacheLock.Lock()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment