HostedZone.fromlookup not working in nested stacks
See original GitHub issueWhen using HostedZone.fromLookUp in a nested stack is not able to find out the hostedzone and keeps the DUMMY id value. Also it does not creates the entry in the context file.
Reproduction Steps
Create a hosted zone in route 53. Then create a stack, inside this stack create a nested stack that just gets a zone based in a domain name:
const zone = HostedZone.fromLookup(this, `zoneId`, {
domainName: domain
});
Error Log
No hosted zone found with ID: DUMMY (Service: AmazonRoute53; Status Code: 404; Error Code: NoSuchHostedZone; Request ID: 9868b6a0-6109-48e6-b475-c31c6041778f)
Environment
- CLI Version : v.1.12.0
- Framework Version: v.1.12.0
- OS : mac
- Language : Typescript
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:7 (1 by maintainers)
Top Results From Across the Web
class HostedZone (construct) · AWS CDK
Import a Route 53 hosted zone defined either outside the CDK, or in a different CDK stack. static fromLookup(scope, id, query), Lookup a...
Read more >How to create hosted zone in AWS CDK? - Stack Overflow
This worked for me. hostedZone = route.HostedZone.from_hosted_zone_attributes(self, 'HostedZone', hosted_zone_id='some id ', zone_name='zone ...
Read more >awslabs/aws-cdk - Gitter
Anyone having issues with UpdatePipeline and SelfMutate being stuck in a loop when using CDK.Pipelines? I can't seem to find a workaround.
Read more >Using Nested Stacks with AWS CDK - DEV Community
A basic example of how Nested Stacks work in AWS CDK. Do not forget to destroy this stack after you're done via: yarn...
Read more >CDK context and Environment | Keep bragging - Technologies
The AWS CDK supports context methods that allow AWS CDK apps to get contextual information. HostedZone.fromLookup: Gets the hosted zones in your account....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I figured it out, you need to add cdk.context.json into repo to give CloudFormationCreateUpdateStackAction the context to load host zone.
On Fri, Oct 30, 2020 at 7:58 PM Ilia luk notifications@github.com wrote:
Still happening, can be avoided with command “cdk deploy”, only happens when using CloudFormationCreateUpdateStackAction.