Cloudwatch: session cache should use UTC consistently (#29627)

This commit is contained in:
Ryan McKinley 2020-12-04 12:44:16 -08:00 committed by GitHub
parent 2f92794c94
commit 752d4ed941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,7 +153,7 @@ func (e *cloudWatchExecutor) newSession(region string) (*session.Session, error)
}
duration := stscreds.DefaultDuration
expiration := time.Now().Add(duration)
expiration := time.Now().UTC().Add(duration)
if dsInfo.AssumeRoleARN != "" {
// We should assume a role in AWS
plog.Debug("Trying to assume role in AWS", "arn", dsInfo.AssumeRoleARN)