I have deployed a Node app onto an Amazon EC2 instance. I then tried to point my domain to this instance. I followed the guide at .html.
I created a hosted zone, entering mydomain.
I then created record sets for the domain and subdomain.
When creating the record for the doman, I entered the following details:
- For Type I choose "A — IPv4 address"
- For Alias I choose "Yes".
- For Alias Target the guide says "choose your root domain website endpoint from the list (for example, example)". However, for me, the dropdown did not have my domain. It only had "No Targets Available". I searched some forums and many people had this issue and the advice was to enter "s3-website-eu-west-1.amazonaws" which I did.
I did the same for subdomain, again entering "s3-website-eu-west-1.amazonaws".
I then went to the service where I bought the domain name and entered the name servers.
However, when i go to my URL, I get:
Code: NoSuchBucket
Message: The specified bucket does not exist
BucketName: mydomain
RequestId: 656B653A2ED5B2B1
HostId: 9etNAX1XEJmbVKUAMylBDz3xEky+7RhAnr9b8HhpkIb9+pkMnn920v/MSAUjr78oyONEUdlba50=
Any Ideas what Im doing wrong?
I have deployed a Node app onto an Amazon EC2 instance. I then tried to point my domain to this instance. I followed the guide at http://docs.aws.amazon./gettingstarted/latest/swh/getting-started-configure-route53.html.
I created a hosted zone, entering mydomain..
I then created record sets for the domain and subdomain.
When creating the record for the doman, I entered the following details:
- For Type I choose "A — IPv4 address"
- For Alias I choose "Yes".
- For Alias Target the guide says "choose your root domain website endpoint from the list (for example, example.)". However, for me, the dropdown did not have my domain. It only had "No Targets Available". I searched some forums and many people had this issue and the advice was to enter "s3-website-eu-west-1.amazonaws." which I did.
I did the same for subdomain, again entering "s3-website-eu-west-1.amazonaws.".
I then went to the service where I bought the domain name and entered the name servers.
However, when i go to my URL, I get:
Code: NoSuchBucket
Message: The specified bucket does not exist
BucketName: mydomain.
RequestId: 656B653A2ED5B2B1
HostId: 9etNAX1XEJmbVKUAMylBDz3xEky+7RhAnr9b8HhpkIb9+pkMnn920v/MSAUjr78oyONEUdlba50=
Any Ideas what Im doing wrong?
Share edited Feb 10, 2016 at 15:39 iSkore 7,5493 gold badges35 silver badges61 bronze badges asked Feb 10, 2016 at 13:42 MarkMark 5,11817 gold badges67 silver badges125 bronze badges 1- If you are using EC2 to host, S3 shiuldnt be used – iSkore Commented Feb 10, 2016 at 15:09
2 Answers
Reset to default 4Per documentation:
When you configure an Amazon S3 bucket for website hosting, you must give the bucket the same name as the record that you want to use to route traffic to the bucket. For example, if you want to route traffic for
example.
to an S3 bucket that is configured for website hosting, the name of the bucket must be `example..
and
If you want to route traffic to an S3 bucket that is configured for website hosting but the name of the bucket doesn't appear in the Alias Target list in the Amazon Route 53 console, or if you're trying to create an alias record programmatically and you're getting an InvalidInput error from the Route 53 API, one of the AWS SDKs, the AWS CLI, or AWS Tools for Windows PowerShell, check the following:
The name of the bucket exactly matches the name of the record, such as example. or www.example..
The S3 bucket is correctly configured for website hosting. For more information, see Hosting a Static Website on Amazon S3 in the Amazon Simple Storage Service Developer Guide.
If you're using EC2, you have to configure Route53 to point to the EC2, not S3. S3 is for static
web hosting, EC2 for dynamic
. With that said, I would highly remend switching to EBS, it is significantly easier to point your domain to an EBS destination, otherwise there's a bit more set up. For Route53 to EC2:
- Navigate to EC2 and hit Elastic IP
- Register a new Elastic IP address
- Associate this address with your instance
- Go to instances and you should see a blue IP address hyperlink instead of a black one
- Go back to Route53 > hosted zones > you're domain
- Create a resource record set in your hosted zone.
- Choose Type A – Ipv4 address.
- For Value, specify the Elastic IP address for your Amazon EC2 instance.
Another thing, if you are using a third party vendor, all you have to do is put in the NS record (to match your Route53 ones) and the Elastic IP in the providers site. (And I would remend swapping it to AWS, so much easier)
Update
@Mark also had port connection issues:
- Navigate your
app.js
file OR./bin/www
(if you're usingexpress
) and change the listening port to80
. - Check your instances security group to make sure it says
ining access: HTTP Port: 80
This is a mon mistake because developing locally does not like when you use port 80. Hence the frequent default to 3000
, 8080
, etc.