route53: Use NewSessionWithOptions instead of deprecated New. Fixes #458. (#528)

This commit is contained in:
Johannes Ebke 2018-04-12 15:08:23 +02:00 committed by Matt Holt
parent 3c9be22bc0
commit b2c4f3c84e

View file

@ -70,7 +70,11 @@ func NewDNSProvider() (*DNSProvider, error) {
r := customRetryer{} r := customRetryer{}
r.NumMaxRetries = maxRetries r.NumMaxRetries = maxRetries
config := request.WithRetryer(aws.NewConfig(), r) config := request.WithRetryer(aws.NewConfig(), r)
client := route53.New(session.New(config)) session, err := session.NewSessionWithOptions(session.Options{Config: *config})
if err != nil {
return nil, err
}
client := route53.New(session)
return &DNSProvider{ return &DNSProvider{
client: client, client: client,