Does anyone know if there is a way of keeping the same set of NameServer records consistent in Route 53 Public Hosted Zone between deploys using CDK (Typescript)?
Whenever a new CDK stack is deployed that includes a Route53 Public Hosted Zone, it assigns a (random??) set of 4 NameServers for the zone. When the stack is destroyed and redeployed it assigns a different set of NameServers. This causes several problems; ie. during each deployment the domain needs to be manually updated at the registrar to point to the changed NS, it then takes time for the new NS records to propagate which seems to interfere with certificates getting validated (DNS) in the same stack (as it intermittently times out and rolls back the deployment while waiting to validate certificates), and it sometimes takes a very long time after deployment for the domain name to correctly resolve to its targets.
Outside of CDK I see there is a way of creating a reuseable delegation set (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/route-53-concepts.html#route-53-concepts-reusable-delegation-set) -- this sounds kind of like what I want to do??? -- but I've scoured the docs and Google and so far can't seem to find a way to fix the assignment of NS using CDK. Any ideas to solve this? Thanks!
question from:
https://stackoverflow.com/questions/65948098/assign-a-fixed-reusable-set-of-nameserver-records-in-a-route-53-public-hosted-zo 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…