mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
AWS: Set CredentialsChainVerboseErrors
This avoids a rather confusing error message. Fix #39374
This commit is contained in:
parent
4a8c245e6e
commit
bad277e98b
@ -500,10 +500,13 @@ func (p *awsSDKProvider) getCrossRequestRetryDelay(regionName string) *CrossRequ
|
||||
}
|
||||
|
||||
func (p *awsSDKProvider) Compute(regionName string) (EC2, error) {
|
||||
service := ec2.New(session.New(&aws.Config{
|
||||
awsConfig := &aws.Config{
|
||||
Region: ®ionName,
|
||||
Credentials: p.creds,
|
||||
}))
|
||||
}
|
||||
awsConfig = awsConfig.WithCredentialsChainVerboseErrors(true)
|
||||
|
||||
service := ec2.New(session.New(awsConfig))
|
||||
|
||||
p.addHandlers(regionName, &service.Handlers)
|
||||
|
||||
@ -514,10 +517,13 @@ func (p *awsSDKProvider) Compute(regionName string) (EC2, error) {
|
||||
}
|
||||
|
||||
func (p *awsSDKProvider) LoadBalancing(regionName string) (ELB, error) {
|
||||
elbClient := elb.New(session.New(&aws.Config{
|
||||
awsConfig := &aws.Config{
|
||||
Region: ®ionName,
|
||||
Credentials: p.creds,
|
||||
}))
|
||||
}
|
||||
awsConfig = awsConfig.WithCredentialsChainVerboseErrors(true)
|
||||
|
||||
elbClient := elb.New(session.New(awsConfig))
|
||||
|
||||
p.addHandlers(regionName, &elbClient.Handlers)
|
||||
|
||||
@ -525,10 +531,13 @@ func (p *awsSDKProvider) LoadBalancing(regionName string) (ELB, error) {
|
||||
}
|
||||
|
||||
func (p *awsSDKProvider) Autoscaling(regionName string) (ASG, error) {
|
||||
client := autoscaling.New(session.New(&aws.Config{
|
||||
awsConfig := &aws.Config{
|
||||
Region: ®ionName,
|
||||
Credentials: p.creds,
|
||||
}))
|
||||
}
|
||||
awsConfig = awsConfig.WithCredentialsChainVerboseErrors(true)
|
||||
|
||||
client := autoscaling.New(session.New(awsConfig))
|
||||
|
||||
p.addHandlers(regionName, &client.Handlers)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user