Custom Domain set up for Next.js App Confusion. Invalid Viewer Certificate Error

Hey everyone I’m trying to set up t* he serverless.yml file to host custom domains. Right now my domain is hosted on Route 53 and I also have a certificate and a hosted zone in US-East 1 generated for it in AWS. My domain is sekndapp.com and the domain and certificate are for that domain. I can’t find much help in configuring the .yml file and right now it looks like this.

  • myNextApplication:
    
  •   component: "@sls-next/serverless-component@1.17.0"
    
  •   inputs:
    
  •     domain: ["", "sekndapp.com"]
    

The error that was coming up said this.

InvalidViewerCertificate: The certificate that is attached to your distribution doesn’t cover the alternate domain name (CNAME) that you’re trying to add. For more details, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements.

I’m confused on how to configure this and to get it to work. Where could I add the CNAME record and is there anything else I need to add to configure the .yml file?