diff --git a/provider/aws/aws.go b/provider/aws/aws.go index 7b9dc7723..b20cd760a 100644 --- a/provider/aws/aws.go +++ b/provider/aws/aws.go @@ -416,6 +416,9 @@ func (p *AWSProvider) records(ctx context.Context, zones map[string]*route53.Hos } for _, ep := range newEndpoints { + if ep == nil { + continue + } if r.SetIdentifier != nil { ep.SetIdentifier = aws.StringValue(r.SetIdentifier) switch { diff --git a/provider/aws/aws_test.go b/provider/aws/aws_test.go index ab753540a..ef7b7105d 100644 --- a/provider/aws/aws_test.go +++ b/provider/aws/aws_test.go @@ -353,6 +353,12 @@ func TestAWSRecords(t *testing.T) { TTL: aws.Int64(recordTTL), ResourceRecords: []*route53.ResourceRecord{{Value: aws.String("8.8.8.8")}}, }, + { + Name: aws.String("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.ext-dns-test-2.teapot.zalan.do."), + Type: aws.String(route53.RRTypeA), + TTL: aws.Int64(recordTTL), + ResourceRecords: []*route53.ResourceRecord{}, + }, { Name: aws.String("*.wildcard-test.zone-2.ext-dns-test-2.teapot.zalan.do."), Type: aws.String(route53.RRTypeA),