All of our DNS entries currently reside outside of AWS. We would like to migrate to Route53, but as part of this, we would like to build a redeployable method of standing up the entire zone from scratch, including creating entries for non-AWS resources. So far, I have not identified a bulk transfer option outside of the AWS Console. Instead, my TypeScript CDK code currently iterates over a list of records and creates each one individually. This would be fine, except I've surpassed the number of resources allowed in a stack. Before I go to the trouble of refactoring this to generate multiple stacks and avoid the resource limit, does a method to bulk import via code exist?
Each Route53 record is its own CloudFormation resource, so you can't hack around that, as long as you're using CloudFormation to create them. There's a RecordSetGroup
resource (Cloudformation docs), but each record in the group is still represented by a RecordSet
resource.
Now, a hacky workaround would be to use a custom resource - this is a Lambda that you implement that does pretty much anything, including creating an arbitrary amount of records.
Check out the custom resources CDK docs for details.