I am having difficulty setting up an A record for ...
# typescript
s
I am having difficulty setting up an A record for route53 using awsx. I created a vpc, a network load blancer, a network listener and a network target. I have some services running. How can I get the hostedZone of the vpc? The following code throws an error
Copy code
const vpcHostedZone = vpc.id.apply(vpcId => aws.route53.getZone({ vpcId }));

**Error: invocation of aws:route53/getZone:getZone returned an error: invoking aws:route53/getZone:getZone: Either name or zone_id must be set**
I can not seem to obtain the zone information from the network load balancer either. I can see it on aws console the Hosted zone information associated with the network load balancer. How can I obtain this programatically? thanks
w
I don’t believe there is such a thing as “a hosted zone of a VPC”. The load balancer has
zoneId
and
dnsName
properties which should give you what you need to create an A record.
s
thank you. got it to work.