使用 AWS re:Post 即表示您同意 AWS re:Post 使用條款

Can't enable custom domain on Lightsail

0

I've set up the SSL Certificate but can't enable the custom domain. I get the following error:

Error AttachCertificateToDistribution[us-east-1]

Alternative Domain Names [domain.com, www.domain.com] have one or more parameter that is already associated with a different resource.

InvalidInputException

We've moved the A record to the corresponding IP and the site works, but it's not secure. Thanks.

已提問 2 年前檢視次數 909 次
2 個答案
1

Hi rdWebDev,

As you may already know, Lightsail distribution only accepts certificates that are created in the us-east-1 region.

InvalidInputException error usually indicates that the input data in your AttachCertificateToDistribution action does not conform to the validation rules for this action. When you create the A record for your domain use your root domain (e.g, domain.com) to point to your distribution and also create a CNAME record using your subdomain (e.g. blog.domain.com) to points to your distribution. For more information on how to enable custom domain in Lightsail refer to this documentation.

I hope this will help.

Additional Resources:

  1. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-enabling-distribution-custom-domains
  2. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html
  3. https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_AttachCertificateToDistribution.html
已回答 2 年前
0

Hi rdWebDev,

The InvalidInputException you received indicates there may be a Cloudfront distribution that is already configured with one of the domain names associated with the certificate.

The resources linked above by @Cebi will also hopefully point you in the right direction.

Thanks for using Lightsail

AWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南