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, ...@@ -58,8 +58,8 @@ func (u *S3Uploader) Upload(ctx context.Context, imageDiskPath string) (string,
SecretAccessKey: u.secretKey, SecretAccessKey: u.secretKey,
}}, }},
&credentials.EnvProvider{}, &credentials.EnvProvider{},
remoteCredProvider(sess),
webIdentityProvider(sess), webIdentityProvider(sess),
remoteCredProvider(sess),
}) })
cfg := &aws.Config{ cfg := &aws.Config{
Region: aws.String(u.region), Region: aws.String(u.region),
......
...@@ -106,8 +106,8 @@ func GetCredentials(dsInfo *DatasourceInfo) (*credentials.Credentials, error) { ...@@ -106,8 +106,8 @@ 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},
remoteCredProvider(sess),
webIdentityProvider(sess), webIdentityProvider(sess),
remoteCredProvider(sess),
}) })
credentialCacheLock.Lock() 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