Merge pull request #1325 from justinsb/always_set_verbose_aws

Always set CredentialsChainVerboseErrors when initializing AWS
This commit is contained in:
Justin Santa Barbara 2017-01-03 20:34:15 -05:00 committed by GitHub
commit 5d4cf07fa1
4 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,7 @@ func NewRoute53DNSProvider(zoneName string) (*Route53DNSProvider, error) {
})
config := aws.NewConfig()
config = config.WithCredentialsChainVerboseErrors(true)
p.client = route53.New(s, config)

View File

@ -72,6 +72,8 @@ func NewAWSVolumes() (*AWSVolumes, error) {
})
config := aws.NewConfig()
config = config.WithCredentialsChainVerboseErrors(true)
a.metadata = ec2metadata.New(s, config)
region, err := a.metadata.Region()

View File

@ -43,6 +43,8 @@ func ValidateRegion(region string) error {
awsRegion = "us-east-1"
}
config := aws.NewConfig().WithRegion(awsRegion)
config = config.WithCredentialsChainVerboseErrors(true)
client := ec2.New(session.New(), config)
response, err := client.DescribeRegions(request)

View File

@ -46,6 +46,8 @@ func (s *S3Context) getClient(region string) (*s3.S3, error) {
s3Client := s.clients[region]
if s3Client == nil {
config := aws.NewConfig().WithRegion(region)
config = config.WithCredentialsChainVerboseErrors(true)
session := session.New()
s3Client = s3.New(session, config)
}