https://pulumi.com logo
#typescript
Title
# typescript
s

stale-park-1622

10/13/2019, 3:56 PM
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

white-balloon-205

10/13/2019, 4:14 PM
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

stale-park-1622

10/13/2019, 4:33 PM
thank you. got it to work.