1
votes

I am trying to migrate a PHP site to AWS.

I have created an instance with a specific AWS url and have configured an AWS Route 53 service.

Looking at the docs here: http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html#root-domain-walkthrough-update-ns-record

It says to update the Nameservers for the particular domain, however that would affect the live version of the site which is still being hosted on Digital Ocean.

What I want to do is:

  • Point a subdomain e.g. dev.mysite.com to the dev environment on AWS
  • Check everything is ok
  • Create a live environment on AWS
  • Point mysite.com to the live environment.

I am still new to this way of hosting, is what I am trying to achieve, feasible.

Or is there another way I should be tackling this.

Any suggestions welcome.

Thanks

1
You didn't mention using Amazon S3... so it isn't clear why you are following an S3 walkthrough document. Where is your DNS hosted, now?Michael - sqlbot
@Michael-sqlbot I got the domain on epik.comtomaytotomato
That's your registrar. The DNS may be hosted there, or elsewhere. If the DNS is there, then you simply add a new A record in their DNS control panel for "dev."Michael - sqlbot
Ok I have created a new A record but what IPV4 address do I point it to? on Route 53 I created an A record but it doesnt have an IPV4 address associated with it.tomaytotomato
Sorry, with elastic beanstalk and a classic load balancer and an external DNS host, you want a CNAME, not an A record, and you put the hostname provided by beanstalk for the CNAME record target.Michael - sqlbot

1 Answers

3
votes

That's absolutely fine. Within Route 53, you can create an a record for your Apex (www.site.com) to point to your EC2 (?) instance, and then another CNAME record which points to your dev.site.com

Note that Alias records are free, and the preferred way of doing the above, but only work with certain types of AWS resources such as ELBs.