copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

app init with custom domain: The account does not seem to own the domain that you entered

Open gcstr opened this issue 2 years ago • 3 comments

I'm not quite sure why I'm seeing this warning. The domain I'm trying to use, although it was not registered via Route53, has a hosted zone in the same account.

If I try to initialize the app with any other domain in my account that was registered via Route53, the init process works fine.

Are there any additional steps to be able to use domains not registered via AWS? Can it be related with the fact that .dev TLD isn't supported by AWS?

$ copilot app init --domain mydomain.dev
Note: The account does not seem to own the domain that you entered.
Please make sure that mydomain.dev is registered with Route53 in your account, or that your hosted zone has the appropriate NS records.
To transfer domain registration in Route53, see:
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-to-route-53.html
To update the NS records in your hosted zone, see:
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html#NSrecords

gcstr avatar Apr 13 '22 01:04 gcstr

Hello @gcstr.

Are there any additional steps to be able to use domains not registered via AWS?

Yes it is possible and it is also a Copilot feature that is actively worked on right now (see #2694) (hopefully included in our next release so please stay tuned)!

After #2694, you would need to request an ACM certificate on your own for whatever domain and subject alternative names you'd like to use for your environment, and then follow the prompt on the console to validate the certificate on your own (since it is not registered on Route 53 unfortunately we can't help on this). Then create an environment with this certificate imported. After that you can deploy your service to the environment and specify the custom domain you'd like to use and add A-record on your own to wherever you registered your domain.

Let me know if anything is not clear to you!

iamhopaul123 avatar Apr 13 '22 17:04 iamhopaul123

@iamhopaul123 thanks a lot for submitting this new feature to copilot 1.18, I'll give it a try this week!

The docs are clear that to use a custom cert, one should pass the ARN with the env init command:

copilot env init --import-cert-arns [cert-arn]

Does it mean that there is no way to change or update the certificates without recreating the environment?

gcstr avatar May 09 '22 20:05 gcstr

Hello @gcstr. Thank you for your support for Copilot! As for v1.18, unfortunately there's no way to do env init for an existing environment. However, we are working on the "env manifest" feature which will allow users to config and apply changes to their environments. Please stay tuned for that and feel free to comment!

iamhopaul123 avatar May 09 '22 20:05 iamhopaul123

This issue is stale because it has been open 60 days with no response activity. Remove the stale label, add a comment, or this will be closed in 14 days.

github-actions[bot] avatar Sep 14 '23 00:09 github-actions[bot]

This issue is closed due to inactivity. Feel free to reopen the issue if you have any further questions!

github-actions[bot] avatar Sep 28 '23 00:09 github-actions[bot]