Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route53 A/AAAA Alias Record to ELB does not use "dualstack" prefix #6271

Closed
httpdigest opened this issue Feb 13, 2020 · 4 comments · Fixed by #8747
Closed

Route53 A/AAAA Alias Record to ELB does not use "dualstack" prefix #6271

httpdigest opened this issue Feb 13, 2020 · 4 comments · Fixed by #8747
Assignees
Labels
@aws-cdk/aws-route53 Related to Amazon Route 53 bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md in-progress This issue is being actively worked on. p2

Comments

@httpdigest
Copy link

When creating an ALIAS A/AAAA record in Route53 pointing to an ELB on the Web Console, the name will always have a "dualstack" prefix, as also suggested by the AWS documentation: https://aws.amazon.com/de/premiumsupport/knowledge-center/alias-resource-record-set-route53-cli/

If you're pointing to an Elastic Load Balancer, always include dualstack in the value for the DNSName key-value pair of the JSON file.

This ensures that both IPv4 and IPv6 addresses are solved.

However, a CDK ARecord as well as a AaaaRecord with a LoadBalancerTarget will not add this "dualstack" prefix.

Reproduction Steps

import * as route53 from '@aws-cdk/aws-route53';
import * as route53targets from '@aws-cdk/aws-route53-targets';
...
const elbZoneAAAARecord = new route53.AaaaRecord(this, 'ElbAaaaRecord', {
  zone: zone,
  target: route53.RecordTarget.fromAlias(new route53targets.LoadBalancerTarget(elb)),
});

When looking at Route53 record in the the Web Console, the record will not have the "dualstack" prefix.

Environment

  • CLI Version : 1.23.0 (build 01f326e)
  • Framework Version: 1.23.0 (build 01f326e)
  • OS : Windows 10 x64
  • Language : typescript

This is 🐛 Bug Report

@httpdigest httpdigest added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 13, 2020
@SomayaB SomayaB added the @aws-cdk/aws-route53 Related to Amazon Route 53 label Feb 13, 2020
@shivlaks shivlaks added the p2 label Feb 18, 2020
@shivlaks
Copy link
Contributor

@httpdigest is it just the prefix that needs to be dualstack or anywhere in the value? The documentation snippet is a little confusing here. But as i understand it, doing it from the console results in dualstack as the prefix.

@shivlaks shivlaks added effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md and removed needs-triage This issue or PR still needs to be triaged. labels Feb 19, 2020
@httpdigest
Copy link
Author

I think the documentation is pretty clear about "dualstack" being a simple prefix to the DNS name of the ELB, as per the example:

For example, if your load balancer's Amazon-provided DNS name is ALB-xxxxxxxx.us-west-2.elb.amazonaws.com, use:
"DNSName": "dualstack.ALB-xxxxxxxx.us-west-2.elb.amazonaws.com"

@shivlaks
Copy link
Contributor

I think the documentation is pretty clear about "dualstack" being a simple prefix to the DNS name of the ELB, as per the example:

For example, if your load balancer's Amazon-provided DNS name is ALB-xxxxxxxx.us-west-2.elb.amazonaws.com, use:
"DNSName": "dualstack.ALB-xxxxxxxx.us-west-2.elb.amazonaws.com"

okay, i was thinking it could be anywhere in the value based on the phrasing of

If you're pointing to an Elastic Load Balancer, always include dualstack in the value for the DNSName key-value pair of the JSON file.

@erikdebruin
Copy link

Is this issue being addressed? I can successfully create a DNS recordset (alias) to a LB, but the value doesn't include the 'dualstack.' prefix. Manually adding the prefix fixed the recordset.

Is there a workaround I can use while waiting for the framework to be fixed?

@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Jun 26, 2020
@mergify mergify bot closed this as completed in #8747 Jun 26, 2020
mergify bot pushed a commit that referenced this issue Jun 26, 2020
…addresses (#8747)

**[ISSUE]**
Route53 A/AAAA Alias Record created by CDK didn't add prefix 'dualstack' to the dnsName of ElasticLoadBalancer as suggested in [documentation](https://aws.amazon.com/de/premiumsupport/knowledge-center/alias-resource-record-set-route53-cli/), resulting in inability to resolve IPv6 records (outcome consistent with these [docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-internet-facing-load-balancers.html)).

**[APPROACH]**
Joined prefix: _dualstack_ to DNS of ELB targets to resolve IPv6 records. 

Example:
> If ELB DNS name is `ALB-xxxxxxxx.us-west-2.elb.amazonaws.com`,
> Route53 A/AAAA Alias Record will create Alias Target `dualstack.ALB-xxxxxxxx.us-west-2.elb.amazonaws.com`

**[NOTE]** 
Ignoring the case of using `ApiGatewayDomain(domainName)` because the prefix of 'dualstack' should be added in the `domainName` parameter.

```
new route53.ARecord(this, 'AliasRecord', {
  zone,
  target: route53.RecordTarget.fromAlias(new alias.ApiGatewayDomain(domainName)),
});
```

If creating an ApiGatewayDomain for ELB, endpoint for ELB with prefix 'dualstack' should be declared there, not within route53 package.

Fixes #6271 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-route53 Related to Amazon Route 53 bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md in-progress This issue is being actively worked on. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants