From b2c4f3c84edb8fa3cdf4ae7d76acc5c57798de94 Mon Sep 17 00:00:00 2001 From: Johannes Ebke Date: Thu, 12 Apr 2018 15:08:23 +0200 Subject: [PATCH] route53: Use NewSessionWithOptions instead of deprecated New. Fixes #458. (#528) --- providers/dns/route53/route53.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/providers/dns/route53/route53.go b/providers/dns/route53/route53.go index 934f0a2d..e16e12f0 100644 --- a/providers/dns/route53/route53.go +++ b/providers/dns/route53/route53.go @@ -70,7 +70,11 @@ func NewDNSProvider() (*DNSProvider, error) { r := customRetryer{} r.NumMaxRetries = maxRetries 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{ client: client,