Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom domain add error - One or more of the CNAMEs you provided are already associated with a different resource #13266

Closed
3 tasks done
nilyin opened this issue Apr 18, 2024 · 8 comments
Labels
Hosting Issues related to Amplify Hosting question General question

Comments

@nilyin
Copy link

nilyin commented Apr 18, 2024

Before opening, please confirm:

JavaScript Framework

Vue

Amplify APIs

GraphQL API

Amplify Version

v5

Amplify Categories

auth, storage, function, api, hosting

Backend

Amplify CLI

Environment information

# Put output below this line
System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
    Memory: 22.97 GB / 31.90 GB
  Binaries:
    Node: 20.12.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 123.0.6312.107
    Edge: Chromium (123.0.2420.81)
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    @aws-amplify/ui-vue: ^3.1.30 => 3.1.30
    @popperjs/core: ^2.11.8 => 2.11.8
    @prismicio/client: ^7.3.1 => 6.9.0
    @prismicio/vue: ^4.1.0 => 3.2.1
    @types/crypto-js: ^4.2.2 => 4.2.2
    @vue/cli-plugin-babel: ~5.0.8 => 5.0.8
    @vue/cli-plugin-eslint: ~5.0.8 => 5.0.8
    @vue/cli-service: ^5.0.8 => 5.0.8
    @vue/compiler-sfc: ^3.4.21 => 3.4.21
    aws-amplify: ^5.3.18 => 5.3.18
    bootstrap: ^5.3.3 => 5.3.3
    buffer: ^6.0.3 => 6.0.3 (4.9.2, 5.7.1)
    core-js: ^3.36.1 => 3.36.1 (2.6.12)
    crc: ^4.3.2 => 4.3.2
    crypto-js: ^4.2.0 => 4.2.0
    es6-promise: ^4.2.8 => 4.2.8
    eslint: ^8.57.0 => 9.0.0
    eslint-config-async: ^2.0.2 => 2.0.2
    eslint-config-prettier: ^9.1.0 => 9.1.0
    eslint-plugin-prettier: ^5.1.3 => 4.2.1
    eslint-plugin-vue: ^9.23.0 => 9.24.1
    util: ^0.12.5 => 0.12.5
    uuid: ^9.0.1 => 9.0.1 (3.4.0, 8.3.2, 8.0.0)
    vue: ^3.4.21 => 3.4.21
    vue-eslint-parser: ^9.4.2 => 9.4.2
    vue-image-crop-upload: ^3.0.3 => 3.0.3
    vue-loader-v16: ^16.0.0-beta.5.4 => 16.0.0-beta.5.4
    vue-router: ^4.3.0 => 4.3.0
    vue3-popper: ^1.5.0 => 1.5.0
    vuex: ^4.1.0 => 4.1.0
    vuex-persistedstate: ^4.1.0 => 4.1.0
  npmGlobalPackages:
    @aws-amplify/cli: 12.10.3
    @vue/cli: 5.0.8
    npm: 10.5.2
    yarn: 1.22.22

Describe the bug

adding cutom domain resulted to the following message:

Something went wrong. Please refer to our troubleshooting guide below to diagnose the issue. After fixing the issue, choose retry below.
Error message: One or more of the CNAMEs you provided are already associated with a different resource.

I've checked where my subdomains are pointing to (with dig command and online tools). They point correctly to url provided in amplify web console for domain management.

i suspect that subdomain can be connected to one of my previousd amplify account that has been discontinued a few years ago. if so, it looks like a bug.

i was also trying to use aws cloudfront list-conflicting-aliases --distribution-id ??? --alias name.mydomain.me but always got:
The specified distribution does not exist. I tried use hosting url and stackId but they do not work for distribution-id param.
Pls help to solve the problem and advise on how can i get distribution-id for my amplify dev and prod environments deployed in amplify cloud.

Expected behavior

custom domain is validated and added

Reproduction steps

  1. amplify push
  2. go to console and add custom subdomain for prod env (dev has already working subdomain and same master domain)
  3. go error above on last step

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line
Something went wrong. Please refer to our troubleshooting guide below to diagnose the issue. After fixing the issue, choose retry below.
Error message: One or more of the CNAMEs you provided are already associated with a different resource.

aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@nilyin nilyin added the pending-triage Issue is pending triage label Apr 18, 2024
@cwomack cwomack added the GraphQL Related to GraphQL API issues label Apr 19, 2024
@chrisbonifacio chrisbonifacio added Hosting Issues related to Amplify Hosting and removed GraphQL Related to GraphQL API issues labels Apr 24, 2024
@nilyin
Copy link
Author

nilyin commented May 15, 2024

Hi, can somebody get back to me with information on how can I get my current Amplify project distribution id? I visited CloudFront console page, but it has no distributions for my account with Amplify hosted project - https://us-east-1.console.aws.amazon.com/cloudfront/v4/home?region=us-east-1#/welcome

@cwomack
Copy link
Member

cwomack commented May 22, 2024

Hey, @nilyin 👋. Appreciate your patience on a response. Can you see if the steps detailed within this AWS re:Post article can help resolve the issue? In the mean time, I'll reach out to our Hosting team to see if there are further steps to take to unblock you.

@cwomack cwomack added question General question pending-response and removed pending-triage Issue is pending triage labels May 22, 2024
@nilyin
Copy link
Author

nilyin commented May 25, 2024

Hi @cwomack : the recommendations from this post are not applicable as I am using Amplify app, for which I don't know how to get my app's distribution-id (target distribution-id). So that I am not able to use AWS CLI commands described there, as these rely on this parameter.

@nilyin
Copy link
Author

nilyin commented Sep 11, 2024

@cwomack hi. is there any progress for this issue resolution? If you think it is specific only for my case I am ready for a call to illustrate the problem.

@github-actions github-actions bot added the pending-maintainer-response Issue is pending a response from the Amplify team. label Sep 11, 2024
@nilyin
Copy link
Author

nilyin commented Oct 4, 2024

Hi there, just reminding about the issue. Can we schedule a screen-share session to try to settle it?

@cwomack
Copy link
Member

cwomack commented Oct 8, 2024

@nilyin, apologies for the delayed reply on this. This seems to be an Amplify Hosting related issue, and the amplify-hosting repo is currently only accepting new feature requests (see the "note" at top). Because of this, I'll copy the note from that repo for the best way to get help on this:

// Amplify Hosting Repo Note:

This repository only accepts new feature requests for AWS Amplify Hosting. For technical support, we encourage you to open a case with AWS technical support if you have AWS support plan. If you do not have an active AWS support plan, we encourage you to leverage our Amplify community Discord server where community members and staff try to help each other with Amplify.

I think the best way to proceed here is to hop into our Discord server and create a new thread/post in the #amplify -help channel, ensuring the "Hosting" tag is added to this.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Oct 8, 2024
@cwomack cwomack added the pending-community-response Issue is pending a response from the author or community. label Oct 8, 2024
@nilyin
Copy link
Author

nilyin commented Oct 10, 2024

@cwomack hi, thank you for reply. My issue can actually be considered as feature request as well. Namely to add possibility to Amplify CLI (or Amplify Web Console or JSON files of backend configs) command to output distribution-id parameter, to be further used with AWS CLI to resolve the issues like that.

I'll also try posting for help on Discord.

@github-actions github-actions bot added pending-maintainer-response Issue is pending a response from the Amplify team. and removed pending-community-response Issue is pending a response from the author or community. labels Oct 10, 2024
@chrisbonifacio chrisbonifacio removed their assignment Oct 16, 2024
@Jay2113
Copy link

Jay2113 commented Oct 17, 2024

@nilyin 👋 , to give you some context this error can occur if the domain you are trying to connect is already attached to another AWS resource. This resource could typically be a CloudFront distribution, API Gateway endpoint, or Amazon Lightsail app.

i suspect that subdomain can be connected to one of my previousd amplify account that has been discontinued a few years ago.

In this scenario, since the domain is associated to a resource in an AWS account that was discounted in the past the next steps will be to reach out to AWS Support as they can assist with releasing the domain from the older account. Once that is done, you should be able to reconnect it to your app.

@Jay2113 Jay2113 closed this as completed Oct 17, 2024
@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hosting Issues related to Amplify Hosting question General question
Projects
None yet
Development

No branches or pull requests

4 participants