diff --git a/cloudformation/stack.yaml b/cloudformation/stack.yaml index 86164ea2..4e295961 100644 --- a/cloudformation/stack.yaml +++ b/cloudformation/stack.yaml @@ -696,9 +696,7 @@ Resources: if (properties.Id) { return zone.Id === "/hostedzone/" + properties.Id; } else { - var tldParts = properties.Domain.split("."); - var tld = tldParts[tldParts.length - 2] + "." + tldParts[tldParts.length - 1]; - return zone.Name === tld + "."; + return zone.Name === properties.Domain + '.'; } }); if (matching.length != 1)