aws-route53: fromHostedZoneAttributes() fails when multiple hosted zones with the same name exist #33026
Labels
@aws-cdk/aws-route53
Related to Amazon Route 53
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p3
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
Due to a mistake, multiple hosted zones with the same name were created (this was my error during operations).
In CDK, I used
fromHostedZoneAttributes
with both the zone name and zone ID specified to retrieve the correct single zone.Since the zone ID is unique, I expected a single zone to be retrieved.
However, the result was an error indicating that multiple zones exist.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
The hosted zone with the specified zone ID should be retrieved.
Current Behavior
Reproduction Steps
The following code to create hosted zones is clearly incorrect from an operational standpoint, but should be able to reproduce the issue.
When two hosted zones with the same name have been created, attempting to retrieve one of them by specifying its hosted zone ID results in an error, as shown below.
Possible Solution
No response
Additional Information/Context
CDK CLI Version
2.172.0 (build 0f666c5)
Framework Version
No response
Node.js Version
v22.12.0
OS
macOS 15.2
Language
TypeScript
Language Version
5.7.2
Other information
No response
The text was updated successfully, but these errors were encountered: