juranki / sveltekit-cdk

Tools for deploying SvelteKit to AWS using CDK
https://juranki.github.io/sveltekit-cdk/
MIT License
31 stars 5 forks source link

Adding domainNames does not work #31

Closed khuezy closed 1 year ago

khuezy commented 1 year ago

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

juranki commented 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.

khuezy commented 1 year ago

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.