Certificate in Pending state in AWS Certificate Manager - amazon-web-services

Our project is deployed on Elastic Beanstalk and I want to run this on HTTPs. I created my certificate on AWS Certificate Manager and choose DNS verification option. I added provided data in my Godaddy DNS records. Below is my sample data
Domain Name | Record Name | Record Type | Record Value
example.com | _8046ecb910c52234234234234232ecae.example.com. | CNAME | _81b05686qweerttcxsaxasdadas5a566.tljzshvwok.acm-validations.aws.
*.example.com | _8046ecb910c52234234234234232ecae.example.com. | CNAME | _81b05686qweerttcxsaxasdadas5a566.tljzshvwok.acm-validations.aws.
AWS has given my two records for example.com and *.example.com but both records are same. So I added one CNAME record in Godaddy DNS entries. I waited for three days and my certificate was still in pending state which in the end expired. I created a new one and I have been waiting for 24 hours and it is still in pending state. I cannot use Email verification method as I am not owner of this domain.

An apparently common error is to paste the entire hostname into a box that does not expect an FQDN, thus creating a record that actually looks like this in DNS (though you may not observe it this way on the screen):
_8046ecb910c52234234234234232ecae.example.com.example.com
For the "hostname," just use _8046ecb910c52234234234234232ecae when creating the record.
After creating it, use dig or nslookup to verify that it resolves as expected.

I had similar issue with AWS certificate in 'Pending validation' state for quite some time. After few tries I finally got it to get in 'Success' state. It might vary by domain registrar , in my case it was NameCheap.
Refer the screenshots from AWS ACM and NameCheap to follow the step that got it working for me:

I also had this issue and waited a day but still Pending Validation. I followed answers here but still got confused and Pending Validation so I decided to share the step by step of what worked for me in NameCheap.
In AWS:
Export the DNS configuration file. It will have something like this.
Domain Name,Record Name,Record Type,Record Value
mysite.io,_beocc4be975f27599f5d77f87af84321.mysite.io.,CNAME,_6ae531c5dad6c5ceeefd65a73d532881.dumrqilasr.acm-validations.aws.
In NameCheap:
Choose "Domain" tab > NameServers - Choose NameCheap Basic DNS
Choose "Advanced DNS" tab > Host Records
Under Type, choose "CNAME record"
Under Host, use the value in "Record Name". Do not include the domain name.
_beocc4be975f27599f5d77f87af84321.
Under Value, use the value in "Record Value". Copy everything.
_6ae531c5dad6c5ceeefd65a73d532881.dumrqilasr.acm-validations.aws.
Under TTL, choose "Automatic"
Save the settings by clicking the check icon right beside TTL.
In AWS:
Refresh the AWS Certificate Manager after 2-5 minutes. It should only take a few minutes for Amazon status to change from Pending Validation to Issued.

I have the same pending-forever issue with the domain which I registered at Freenom because I forgot to set the name servers from AWS Route 53 to Freenom.
Name servers from AWS Route 53:
*(ns means name server)
Set the name servers above to Freenom:
Then, it was validated from pending. However, even if I set name servers to Freenom, it sometimes takes a forever time to be validated. In this case, I delete the request and make a new request a few hours later again, then, it is validated properly.
Optionally saying, we registered the domains at the domain providers like GoDaddy, Namecheap, Freenow and so on, then, we need to set the name servers from AWS Route 53 to GoDaddy, Namecheap, Freenow and so on. Finally, our domains will be validated from AWS Certificate Manager.

I needed the same solution as #Kai - had to add the NS records to the primary domain. But my situation was a little bit different:
I'm using AWS Route53 for my domains
with the root domain (example.com.au) in a different AWS account
and a subdomain (subdomain.example.com.au) in the account where I'm creating the certificate
Because it's all within AWS I could just click the "create record in Route 53" button to get the verification record automatically added... but the certificate would not resolve
THE PROBLEM : the subdomain was not resolving through to the root domain
HOW I FOUND IT : dig +trace subdomain.example.com.au
that SHOULD return a string of responses from . then au. then com.au. then example.com.au. and finally subdomain.example.com.au.
it did not return the subdomain record, which was the clue that the link between the subdomain and the root domain was not correct.
adding the NS records from the subdomain as a CNAME record on the root domain (similar to Kai's answer) caused the validation to complete almost immediately.

That is my api gw with cloudflare! It works already.

Related

How to create and validate an AWS public certificate on a new subdomain (across AWS accounts)?

I have access to a number of AWS accounts belonging to a client, and would like to set up a public certificate using DNS validation. I believe this means I also need to set up DNS too.
I have two accounts:
dsc-staging (contains new cert, local DNS for subdomain)
eds-staging (contains root of new subdomain)
The new cert/DNS shall be:
gatekeeper.s.aws.example.com
This is set up in account dsc-staging. I have gone through the "DNS validation" option, and it says that it is pending. To start with there is no DNS for this name in either account, so this would eventually fail if left like that.
So, in the same account, I have created a HostedZone in Route 53, which creates default NS and SOA records.
Now, in the other account, eds-staging, there are existing records for:
s.aws.example.internal (NS record with four rows in a single value)
s.aws.example.internal (SOA record)
I have added the validation record in here, as a CNAME. (I am informed that it would be OK to have put the validation record in the local Route 53, but I have chosen for now to do it here).
Now, I believe that I need to inform AWS how to connect gatekeeper.s.aws.example.com with the known internal name s.aws.example.internal, which already exists, and is used by other things. I believe the process of connecting the two is called "delegation". I was given some instructions to take the NS records from the local account for gatekeeper.s.aws.example.com and copy them to the parent domain s.aws.example.internal in the other account.
However, the AWS UI in Route 53 seems to disallow adding another NS record - is it because one already exists? If so can I just add my four records under the existing four (ie. in the same record)?
I believe that if I wire up this DNS so that it is resolvable, the certificate will automatically become validate-able, and that will happen automatically. Is this assumption correct?
I would break it down like this:
Register or transfer the domain to your AWS master billing account. This is the only account that registers domains.
In each sub account eg dev prod, create a R53 hosted zone for the top level domain provisioned in step 1. Make sure the NS servers in step 1 are assigned to the zone here. Pay close attention that they agree both on name AND number of servers - usually 4.
Create a ACM cert request for the root AND wild card domain EG example.com and *.example.com. Request DNS validation. Key here is to include the wild card. This means it will work for any host name in the domain.
In ACM, request that the service create the R53 validation DNS records for you. This is only possible if you have done step 2 in the same account.
Wait for approval. It can take a few mins, to all day. Check back every hour or so.
This process, if followed exactly, will always provide a validated ACM cert that works for any AWS supported service, for both the root domain and any subhost under it.

AWS Route53 pointing to a elastic beanstalk webapp

I've got a web applicaiton set up on elastic beanstalk. I've a domain on route53, and I've followed the guides more or less here:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html
The URL to the webapp works fine, but the DNS is not pointing me to it.
To be honest, I'm not sure where to even begin looking at how to fix this. I've tried to use the 'Check response from Route 53' feature and I can't see anything out of the ordinary. I've attached a lot of pics.
Any idea?
Please see here for the images, I couldn't upload them here. I kepy getting format errors.
http://imgur.com/a/NwCbb
******update*******
Updated, new hosted zone configuration:
******update*******
The name is still not resolving. I've added an A type record set and selected the elastic beanstlak as the alais.
******Answer*******
Credit to imperalix for this.
Amazon registered the wrong name servers for my site.
I needed to go to
https://www.whois.net/
and search for my www.thetellyourstory.com
I got the values for my name server there:
Name Server: NS-1487.AWSDNS-57.ORG
Name Server: NS-187.AWSDNS-23.COM
Name Server: NS-1891.AWSDNS-44.CO.UK
Name Server: NS-802.AWSDNS-36.NET
Then, go into route 53 and update the name server values:
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-name-servers-glue-records.html
It's important to update the name server values only as above. You can edit them directly from http://imgur.com/a/a41z2 here but it does not update the values.
It looks like your registrar, Amazon, has the wrong name servers configured [1]. I compared your whois information with your screenshot. I would recommend updating your name servers[2] for your domain to match what your zone has configured.
Update your registrar to (this is from your screenshot of Route 53 DNS):
ns-1487.awsdns-57.org.
ns-187.awsdns-23.com.
ns-1891.awsdns-44.co.uk.
ns-802.awsdns-36.net.
Your Route 53 DNS configuration look fine[3].
$ whois thetellyourstory.com
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-name-servers-glue-records.html
http://digwebinterface.com/?hostnames=www.thetellyourstory.com.&type=&useresolver=8.8.4.4&ns=self&nameservers=ns-187.awsdns-23.com
Change the NS record to just tellyourstory.com, i.e. remove the "www." from the name value.
Delete the CNAME record with the name cname.www.tellyourstory.com
Change the A record www.tellyourstory.com to a CNAME record. This record doesn't need to be an alias. It just needs to have the value of your elastic beanstalk app.
How long ago did you register this domain name and create these records? For a new domain name it can take 24 hours or so for DNS records to start resolving.

How can I find out what nameservers have been assigned to my DNS?

I have a domain with Amazon but when I try to access it I get a message saying:
DNS Lookup for "www.abc.com" failed. System.Net.Sockets.SocketException The requested name is valid, but no data of the requested type was found
Is there a way that I can check what nameservers are assigned for that DNS?
If you're asking what name servers Amazon has assigned for serving requests for your domain then log into the AWS console, navigate to the Route53 settings, click on Hosted Zones, then click on the name of your domain. At the top of your list of records for your domain you will see an NS record. That record lists all the DNS servers for your domain.
I find http://mxtoolbox.com a useful website for this sort of thing.
Its meant for checking mX records, but after you do that there are DNS checks and other useful domain related lookups you can do.

Amazon Route 53 Issues

I have a hosted zone in Amazon Route 53 service and a domain name on a registrar.
In the registrar, my DNS configurations are correctly inserted, with the four address provided by AWS when I create the hosted zone.
In the Route 53 control panel, I have the NS and SOA proper configured as it came configured when I created the hosted zone.
I also created a A Redirection : mydomain.com.br -> xxx.xxx.xxx.xxx (elastic IP)
I'm able to reach my EC2 instance with the A Record: If I type mydomain.com.br on browser it works fine.
My problem is that I'm unable to reach the CNAME's that I've created.
I have a CNAME rule: www.mydomain.com.br -> mydomain.com.br/site but when I put www.mydomain.com.br I get a DNS error on my browser.
The strangest thing is that if I consult www.mydomain.com.br on a site like https://www.whatsmydns.net it points to www.mydomain.com.br/site, which is the correct redirect. The DNS resolution aparently works fine, but I can't get it on the browser.
Any help would be nice. Thanks.
ps: I alredy tried to ipconfig/flushdns and clear chrome's cache
Try this:
Delete that CNAME record
Add an A record in Route53
Name the A record 'www' it should automatically make that www.mydomain.com.br.
Check the ALIAS-yes box
Select mydomain.com.br. from the dropdown box (note there is a PERIOD on the end)
Save and Wait about 5 minutes.
A better (and still very cheap) way to do this might be to set up a 301 redirect in an Amazon S3 bucket. Here is a link to Amazon's tutorial:
http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
Do you have a "www" A record which is pointed to your EIP?

How to move a domain from Godaddy to AWS Route 53

Since Godaddy went down for some hours my client and I are very upset and want to change everything to AWS.
Everything is done so far, only the domains (blablabla.com) are missing, I'm having a hard time trying to migrate from godaddy to Route 53, Do I have to remove from one and create from scratch from AWS?
Does anyone have any experience on how to do this?
the solution:
Login on your aws console;
Click on Route 53;
Create Hosted Zone;
Select your new created host title and click "Go to Record Sets", take note of the nameservers;
Login on your Godaddy account;
Select your domain;
Go to Nameservers and click SetNameservers;
paste all the four you took from "Go to Record Sets" Route 53;
and that's it..., you don't have to rely on this horrible service Godaddy provides anymore
You can transfer the domain registration to AWS Route 53.
You have to "unlock" the account.
Log On to Go Daddy.
Go to Domain Details Then Settings:
Lock: Set to Off
Authorization Code: Email My Code
Route 53 will need the authorization code to complete the transfer request.
Here are the steps to migrate your internet domain name to AWS route 53 (DNS Manager).
** Be careful where your mail server is hosted, either in the Godaddy mail service, Gmail (gsuite) or in your Cpanel server (VPS/Server).
** To empower your Domain DNS capabilities, you need to transfer the name servers, DNS records and domain name to AWS route53, thats why it's recommended to move to AWS Route 53. You can keep Godaddy to be owner of your yourdomain.com and manage your DNS by Route 53
STEPS:
Go to Godaddy DNS records and understand each of them and note them (Take a screenshot)
Go to AWS route 53, Crete a Public hosted Zone (Create your domain on AWS route 53). Here is a good tutorial about it:
https://www.clickittech.com/aws/migrate-godaddy-to-aws-route53/
Copy your Godaddy DNs records into your Public hosted zone previously created. Remember, each record needs to exist in the new aws zone.
Change your Name Servers to AWS Route 53. What does it means? In order to allow AWS route 53 to manage your domain, DNs records, etc. you need to change your actual Godadaddy Name server (NS) Records to AWS Records.
Go to Godaddy admin Panel and Login
Go to DNS Management
Under Name Servers Click on Change - > Custom - > Change Name Servers
You need to change from NSx.domaincontrol.com to the AWS Name servers.
More info: https://www.clickittech.com/aws/migrate-godaddy-to-aws-route53/
After 4-8 hours your Name Servers will be reflected and propagated around your country, world and networks.
Practically you are done with this.
Additionally, if you need to migrate your website or web app to AWS go to this tutorial, great explanation, see below:
https://www.clickittech.com/aws-migration/transfer-domain-aws-migrate-move-website-aws/
The answer from The Poet above is good for moving everything, but it will also kill your email service with GoDaddy. If you want to keep the email servers running at GoDaddy, you will also need to get your MX email servers and their priority numbers. Mine looked like this...
0 smtp.secureserver.net
10 mailstore1.secureserver.net
Take these over to your Route53 settings, click Create Record Set, choose a type of MX Mail Exchange, and paste these values in (with the number in the front as shown above). Save the record set.
Also PJT was correct; all domain info in Route53 ends with an extra period for some reason specific to AWS, but don't worry about it--it doesn't affect production behavior. When you copy your four from Route53 to paste in GoDaddy's Name Servers, you will need to do them one at a time and trim off the extra period at the end.
If you want to migrate your DNS records to Route 53, you'll need to export them from GoDaddy and recreate them manually in Route 53.
To do this in one automated step, consider a DNS migration tool such as DNSTools.ninja, as outlined here: https://dnstools.ninja/migrate-bind-aws-route53-safely-3-commands/
Be careful with google mx records if you have them.
Why switch to route 53?
AWS Route 53 doesn’t limit you to 64 subdomain.
AWS allows you to host buckets with route 53
It all comes at a 50 cent/month.
AWS Nameservers
Now to answer your question, you need move the name servers to route 53. That means in godaddy name server section should be filled with aws name servers.
See the steps here.
https://metamug.com/article/dns-migrate-godaddy-to-route-53.php
The detailed steps to transfer the domain registrar from GoDaddy to Route 53 is given at https://cloudopian.com/blog/how-to-transfer-domain-registrar-from-godaddy-to-amazon-route-53/
Remember, you first need to transfer your name servers by creating a hosted zone in Route 53 and pointing your godaddy hosted domain to use Route 53's name servers instead of it's own name servers.