question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wildcard * in ARecord recordName does not work

See original GitHub issue

cdk 0.35.0 new route53.ARecord(this, "ARecordSubdomains", { recordName: "*", zone: hostedZone, target: route53.RecordTarget.fromAlias(new route53targets.CloudFrontTarget(cloudFrontDistribution)) });

Gives FATAL problem: DomainLabelEmpty (Domain label is empty) encountered with '*.domain.com.' (Service: AmazonRoute53; Status Code: 400; Error Code: InvalidInput; Request ID: 581858c8-9727-11e9-b5ad-9bb4ba65f088)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
AlexCheemacommented, Jun 26, 2019

My workaround is a CfnRecordSetGroup:

    new route53.CfnRecordSetGroup(this, props.domainName, {
      hostedZoneName: hostedZone.zoneName,
      recordSets: [
        {
          name: `${props.domainName}`,
          type: "A",
          aliasTarget: { dnsName: cloudFrontDistribution.domainName, hostedZoneId: CloudFrontHostedZoneId }
        },
        {
          name: `*.${props.domainName}`,
          type: "A",
          aliasTarget: { dnsName: cloudFrontDistribution.domainName, hostedZoneId: CloudFrontHostedZoneId }
        }
      ]
    });
2reactions
dveldhoencommented, Oct 8, 2019

Seems to be fixed by using the full record name (e.g. ‘subdomain.domain.com.’) instead of only subdomain. Still I think this is a bug, since only subdomain should also work according to CDK documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DNS wildcard not working - TechNet - Microsoft
Window 2003 R2 I have created a wild card dns record: * A ipAddress. This should resolve any host that is entered in...
Read more >
How To Use AWS Route53 Wildcard Subdomains With CDK
This article explains how you can point multiple subdomains to the same frontend deployment. This will enable you to give each of your ......
Read more >
DNS domain name format - Amazon Route 53
example.com, DNS treats it as an * character (ASCII 42), not as a wildcard. The * must replace the entire label. For example,...
Read more >
[SOLVED] SRV Record with Wildcard Name - DNS
Solution: For what it's worth, wildcard SRV is not something I have ... I was hoping simply putting the SRV Record name as...
Read more >
Route53 wildcard issue - dns
I am new to AWS Route53 and I got stuck in a problem and I cant really understand the issue. I have created...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found