Godaddy domain pointing to AWS EC2 instance VPC - amazon-web-services

I have a domain registered at godaddy but want to have webhosting at AWS Amazon. As per the instructions, updated the 'A' record with Elastic IP of AWS. But the website is down and not able to connect. Thanks in advance for any help. Am I missing anything on AWS EC2 VPC? I am not using Route 53 since this is not required as per AWS documentation.

please check your application should hosted in port 80. Can you able to access your application IP:80 from browser..?

Please check the port you are running your application on. If your domain name is somexyz.com and your port is other than 80 (standard TCP port for HTTP service) like 5000 for default Flask werkzeug dev server, you will have to type somexyz.com:5000 on the browser to access your website. Otherwise run it on 80. The stackoverflow discussion here- create a domain name pointing to an IP of port different than 80 should help.
(Also, this may be irrelevant now but the TTL field~600secs etc on godaddy reflects avg time for DNS records to get updated when we edit zone info 'A' field to point to Amazon Ec2 Elastic IP. So waiting for upto an hour or so helps.)

Related

How do I link a .app domain with an AWS EC2 instance

Recently, I purchases a domain from google domains namely, neurocognition.app. I initialized an EC2 instance from AWS (Free tier), got an elastic IP. added the A record, with the same elastic IP at the google website. Its been over 2 weeks but the site still won't work
What could be the possible reason? Do I have to setup my instance in a separate manner for HSTS domains. ???
So, looking at the dns: https://www.whatsmydns.net/#A/neurocognition.app your domain points to 65.0.156.79 which responds on http, but not https.
http://neurocognition.app redirects to https://neurocognition.app
this could mean one of the following:
your security group does not have port 443 open
your web server does not accept connections on port 443
Network Access Control Layer have been modified to block port 443
I would focus on the first two, which are most likely the issue here.
Check your security group, whether it has https port added in route.

How I can make that the request to 'api.mydomain.com:8000' redirect to IP for the EC2 instance

I have an api running in a EC2 instance in AWS in certain port (ej 8000). I have register a domain in bluehost provider.
Currently my app is pointing to the IP that offer the EC2 instance, but I want to change to the domain in order to use like api.mydomain.com:8000.
I tried to create a configuration in the DNS zone of panel control in the bluehost account, but it does not work, I think the DNS type I have to use is the 'SRV record', but I tried some configuration but the cpanel dont take it.
How I can make that the request to 'api.mydomain.com:8000' redirect to the EC2 instance's IP and the configurated port?. Thank you
You can use a normal A record for api.mydomain.com and point that to your instances IP address. You don't include the port anywhere in the DNS configuration.
If it was a website that was on port 8000 you would type api.mydomain.com:8000 in your browser url.
Make sure that your instances security group is open on port 8000, and that your instance is listening on port 8000.
When you say "it didn't work", what do you mean? Where was there a failure?
Normally you would create an 'A'record to point a domain name to a IP address, not a 'SRV' record.

Using Windows DNS Server with AWS Lightsail

I am newly using AWS and I am using first time AWS lightsail. I am in trouble about DNS Server Managing;
I get a static ip but I can't see this static ip in IIS Bindings setting.
I installed DNS Server feature from add roles and features widzard.
I added a Forward Lookup Zone for my site, When I add ns records I can't use public(static ip) so I used private Ip.
I am using many vps providers (Vultr, Google etc.) but I am living first time problem like this.
I reach the site from public(static) ip but I can't reach from domain and I can't reach ns record.
What is I missed about that?
I understood AWS operation type so;
I am using private/internal ip for IIS bindings and DNS records, AWS automatically mask it with public/static ip.
I was living DNS reach problem and I solved the DNS reach problem with opening DNS ports from network security area.
So I missed open the DNS ports from AWS lightsail firewall.

Cannot access AWS domain purchased with Route 53

I recently purchased a domain on AWS mydomain.com with the intention of creating a record set which can forward traffic to an EC2 instance which I also have running. However, when I try to access mydomain.com from a web browser, I get the error that the site cannot be reached.
The record set I created for this domain was myapp.mydomain.com. I configured this to point to my EC2 instance. When I try to access this domain from a web browser, I get a 502 bad gateway error.
Can someone explain what is going on here?
You will need to start by creating a zone in Route53 for the domain - so mydomain.com, NOT anything else.
Once that has been created, there will be 2 records: SOA and NS.
Using the "Registered Domains" screen, click on the domain and make sure that the name server records match the NS records in the zone you created.
Once that is done, you should be able to create a new A record in the mydomain.com zone for myapp.mydomain.com that points to the IP address of your EC2 instance.
The answer given by #chris, which closely follows the official documentation from AWS, is in general the best answer to this question. However, in my case, the 502 error I saw was being caused by that I did not open port 8080 on which my Tomcat server was listening. By adding a custom TCP rule to open port 8080 I was then able to reach my Tomcat.

Why is Elastic Beanstalk Load Balancer refusing to estabilish a SSL connection?

Recently, I started searching about security procedures and came across SSL. Actually, I already knew about SSL, but I found to be too expensive at the time.
Luckily, yesterday I found out that Amazon gives SSL certificates for free!
However, I have spent a whole day trying to set it up but it didn't work.
I have a domain registered at GoDaddy, let's assume its www.mydomain.com. My website is hosted, however, on Amazon Web Services (AWS). I also have access to edit the GoDaddy's DNS records and full access to my AWS account. I have seen LetsEncrypt, but my website runs in ASP.NET (IIS Windows) and currently they only support Linux OS.
Here's what I've tried to do:
Get a SSL Certificate from AWS Certificate Manager
I have chosen to setup via DNS, which means I had to add a CNAME record to GoDaddy domain records.
If you look above carefully on the two images, the CNAME record on AWS is on the center of the page. I've added a record as CNAME containing the values.
Add HTTPS to Load Balancer Listeners:
Allowed HTTPS on Security Groups
NOTE: Both Inbound and Outbund rules are just like above. I have also set the Load Balancer and my Running Instance to use this security group.
Added records to Route 53 Hosted Zones
The A type record points to my instance IP.
The NS record was generated by Amazon (I added GoDaddy's Name servers as well).
The SOA record was generated by Amazon and I didnt touch it.
The CNAME was added by me, It's again the SSL protocol.
I don't know what else to do or if I have a wrong setup.
If I'm not mistaken, you have an EC2 instance behind an ELB (Classic/Application/NLB), requested an ACM certificate which has been issued successfully for *.mydomain.com, created HTTPS listener to use the SSL certificate but getting connection time out on port 443.
The issue is the DNS record of mydomain.com still points to the EC2 instance's IP, which might not be listening on port 443 (and the ELB is not being used at all).
So, to resolve this, you have to use the ELB's DNS name and use it as CNAME in your DNS record (not sure whether in Route 53 or GoDaddy because I don't know which is authoritative NS).
Also, you might consider requesting a new certificate with mydomain.com and *.mydomain.com and update the listener because ACM cert with *.mydomain.com does not protect mydomain.com.