question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CNAMEAlreadyExists error on create_domain

See original GitHub issue

I am pretty sure that this is an issue with serverless-domain-manager, but let me know if you think that I should file it in serverless itself.

I am receiving the below error whenever I try to deploy from one machine, but not CI or another machine. As far as I can tell, the config on the machines matches. I even downgraded the node version to be sure.

$ sls create_domain && sls deploy && sls s3deploy
 
  Error --------------------------------------------------
 
  Error: 'api-dev.mydomain.com' was not created in API Gateway.
BadRequestException: One or more aliases specified for the distribution includes an incorrectly configured DNS record that points to another CloudFront distribution. You must update the DNS record to correct the problem. For more information, see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-restrictions (Service: AmazonCloudFront; Status Code: 409; Error Code: CNAMEAlreadyExists; Request ID: 1475df24-1d02-11e9-a6bb-5712fa564d82)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           8.10.0
     Serverless Version:     1.30.1
 
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1

(Running with SLS_DEBUG=* just tells you that it is about to run create_domain.)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sthuber90commented, May 2, 2020

Okay. I found the error. For my service I used an external DNS provider, that was still pointing the domain name to a non-existent CloudFront distribution. After removing the outdated mapping running sls create_domainworked.

Thank you for this plugin 😃

0reactions
rddimoncommented, Feb 4, 2022

Hi there!

Hope you have solved ana issue. It’s been no activity for a long time and our plugin has got a lot of changes so closing this issue

You can try the latest version of the plugin and open issues in case of any problems

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve the "CNAMEAlreadyExists" error in CloudFront - AWS
The CNAMEAlreadyExists error occurs when the CNAME alias that you are trying to add is already associated with another CloudFront ...
Read more >
Create custom domain returns error 409: CNAMEAlreadyExists
This error is down to a mapping of your domain to a CloudFront distribution. Be aware that if you have a wildcard alias...
Read more >
CloudFront CNAME Already Exists error - Bobcares
The error occurs when the CNAME alias you're trying to add is already associate with another CloudFront distribution. Today, let us see the ......
Read more >
Terraform, AWS Cloudfront and CNAMEAlreadyExists error
Then, typically, you would define CNAME(s) pointing to that cloudfront.net address in your own DNS. Each Cloudfront distribution has a list of ...
Read more >
Domain Name Already Associated With An "Existing ...
How do I resolve the error CNAMEAlreadyExists when setting up a CNAME alias for my Amazon CloudFront distribution? Last updated: 20200806. When I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found