Closed khuezy closed 1 year ago
The distribution needs the domain name to allow access using it. It doesn't create the DNS record.
I added custom domain to the sample stack.
I'll update cdk version in next release.
Thanks for the example!
I think the newer version of aws-cdk-lib
automatically creates the A Record for the CF.Distribution when you give it the certificate
and domainNames
attributes.
I have a Nextjs Stack on a newer version of aws-cdk-lib
and it did so.
EDIT: nvm, it had to manually create the A/AAAA record.
I noticed the
aws-cdk-lib
version is pretty outdated, not sure if that's related. When I deploy and provide a certificate and domainNames, it does not create the A/AAAA record for my alias site, eg:dev.example.com