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.

(All) Fields of DomainNameAttributes should be made optional

See original GitHub issue

In order to be able to create an Alias record on Route53 with an API Gateway target, one needs to use the DomainNameAttributes interface. However, currently all fields of DomainNameAttributes are required, which makes it difficult to use.

Reproduction Steps

  1. Create a public hosted zone on Route53.
  2. Try to add an ARecord targeting an existing api gateway.
  3. The ARecord constructor requires target field of type RecordTarget.
  4. The RecordTarget constructor takes a field, aliasTarget, of type IAliasRecordTarget.
  5. The constructor of ApiGatewayDomain, which implements IAliasRecordTarget, requires an argument of type, IDomainName.
  6. An object of type IDomainName can be obtained by calling DomainName.fromDomainNameAttributes().
  7. fromDomainNameAttributes() takes an argument of type DomainNameAttributes.
  8. There is currently no easy way to construct a DomainNameAttributes object because all of its properties are required, domainName, domainNameAliasHostedZoneId, and domainNameAliasTarget.

Error Log

N/A

Environment

  • CLI Version - 1.30.0 (build 4f54ff7) :
  • Framework Version: 1.30.0 ;
  • OS Ubuntu 18:
  • Language Typescript:

Other

This is needed, among other things, to support naked domains (zone apex record) pointing to the API Gateway.


This is 🐛 Bug Report

Issue Analytics

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

github_iconTop GitHub Comments

8reactions
bmVsc29ucommented, Dec 25, 2020

@nija-at’s solution is totally ok for certain use cases, but consider the scenario to manage route53 and api-gateway stacks separately in different repositories, the below seems impossible and even the documentation does not helped with such field domainNameAliasTarget:

// shorthands are given
 const d = DomainName.fromDomainNameAttributes(this, 'domain', {
            domainName,
            domainNameAliasTarget: **'what should I filled up for this?',**
            domainNameAliasHostedZoneId
        })
 const aliasApi = new ARecord(this, `alias.api`, {
            zone,
            recordName,
            target: RecordTarget.fromAlias(new ApiGatewayDomain(d)),
        });
0reactions
SomayaBcommented, Apr 14, 2020

Closing for now since there hasn’t been a response in a while. Feel free to reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

interface DomainNameAttributes · AWS CDK
The values are placeholders you should change. import * as apigateway from '@aws-cdk/aws-apigateway'; const domainNameAttributes: apigateway.
Read more >
awscdkapigatewayv2alpha - Go Packages
Returns true if the construct was created by CDK, and false otherwise. Experimental. ... Authorizer IHttpRouteAuthorizer `field:"optional" json:"authorizer" ...
Read more >
Cisco Prime Network Registrar 10.1 DHCP User Guide
Different use-cases for DHCPv4 and DHCPv6 DNS update made server design ... in the DHCP packet in fields other than the option space....
Read more >
Oracle Transportation and Global Trade Management Cloud ...
For example, a) new or expanded BI subject areas need to first be ... request contained all GID, XID and Domain Name attributes...
Read more >
DomainTools Iris Investigate - Connectors - Microsoft Learn
It enables easy pivoting through different domain name attributes and exposes meaningful insights with connection counts on most data fields.
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