I'm currently moving all of my hosting from a cheap shared hosting provider over to Amazon LightSail. Normally, when sending work over to clients for approval, I create a subdomain through my hosting provider's c-panel and upload the required files through FTP.
I am at a loss when it comes to setting up a subdomain through AWS Lightsail though. I've created a static IP and I've created the A record for the subdomain, but where do I put the directory that the files I want my client review for that subdomain sit and what IP address do I need to point the subdomain at?
AWS LightSail is different from shared hosting providers, where AWS provides Virtual Private Servers(VPS) with its own IP.
Generally VPS is for a single deployment of an application(e.g Single Wordpress Deployment per VPS). So it is recommended to get multiple VPS for your deployments unless your applications are really light weight and gets less traffic.
There is also a limit where you gets 2 VPS servers per AWS account by default. If you need more VPS, either you can send a support request to Amazon and increase the limit or use multiple AWS accounts (If you own the AWS accounts, you can setup consolidated billing)
In DNS setup, since its single application per VPS, you need to create a A record for each subdomain.
I had faced the same problem. I had used up 2 Lightsail instances per account as the other answer mentioned. I had no way to setup subdomain for another application I hosted on Elastic Beanstalk.
Solution is - Use Route53 & Create Hosted Zone there. Instead of creating DNS Zone in Lightsail. Then point A record to the Static IP of Lightsail.
Hope this solves your problem.
Related
The current setup was the application is load-balanced at AWS. The domain(www.Example.com) we are using is registered at GoDaddy.com.
My concern is that, do we need to upgrade our GoDaddy hosting even if the files are load-balance at AWS?
Let's say that we have had a 50K concurrent users.
Thanks for the insight in-advanced.
When you say "the application is load-balanced at AWS", it suggests that there is the following setup on AWS:
One or more Amazon EC2 instances running a web application, and
An Elastic Load Balancer that is directing incoming traffic to those instances
Your GoDaddy account probably has a Domain Name with a CNAME record that points to the DNS Name of the Load Balancer on AWS.
If this is true, then you do not need a "hosting plan" on GoDaddy, since it would just be managing your Domain Name. Scaling is not necessary for Domain Names.
Increasing the load would possibly require creating additional EC2 instances on AWS, but you might have an Auto Scaling group doing this for you automatically.
You should investigate what you actually have on GoDaddy and on AWS.
Trying to host multiple applications on AWS Lightsail with https being allowable on all of them, but running into a problem. It appears as though the Lightsail load balancers only allow a single certificate to be active at one time. These sites are low-traffic so I would like to only have a single load balancer or ec2 instance for multiple domains that can support https on all of them. Does AWS provide a way to do this that integrates with Lighsail or what is the recommended approach?
You are correct that LightSail balancers only support 1 certificate, but that single certificate can support up to 10 domain names.
One of the domains is the "main" one and the other (up to) 9 are "alternate" domains and subdomains, but operationally it doesn't make any difference which one is the "main" one and which ones are alternates.
https://lightsail.aws.amazon.com/ls/docs/en/articles/add-alternate-domain-names-to-tls-ssl-certificate-https
Certificates are not editable, so if you already created one, you'll need to create a new one with all the domains, and attach it to the balancer.
I recently registered a domain (say example.com) at GoDaddy.com and I would now like to host many web services in different subdomains using my Amazon EC2 server.
I pointed the domain to my elastic IP address but, is it this enough on the GoDaddy side? That is to say, do I now have to create and manage the subdomains on the Amazon server or at GoDaddy? How should I do it?
Also, what's the advantage between an Amazon route 53 hosted zone and just pointing the domain to the Elastic IP? Is there any advantage?
Thanks!
do I now have to create and manage the subdomains on the Amazon server
or at GoDaddy?
You need to create each subdomain at your DNS service (Godaddy) and point each of those subdomains to your Elastic IP. On the AWS side you will need to configure the web server running on EC2 with the knowledge of each of those subdomains, and what content it needs to serve for each of them.
what's the advantage between an Amazon route 53 hosted zone and just
pointing the domain to the Elastic IP?
There are certain AWS services like Elastic Load Balancers and S3 static websites that do not provide an IP address, only a domain name. To map the root of your domain to one of those services you would have to use Route53 alias records. Route53 also offers features like health checks, failover routing, latency routing, etc. Other than that, there isn't really any advantage to Route53 versus another DNS service like GoDaddy.
I have an issue that I have been trying to work out for a while now. I am experimenting with AWS and thinking of moving sites over, but I can't get DNS to work with OpsWorks apps. I have a PHP / RDS stack that I have a few apps in.
These were working great except for the issue of OpsWorks instances having a dynamic DNS that changes upon instance reboot. I don't want to have to change my DNS records in Route53 every time that happens, so I implementated an EIP, registered it with the instance, and registered it with OpsWorks. I added rules to the policy that the EC2 uses for default VPC to accept incoming HTTP requests as well.
Now, when I add an A record to my DNS zone that points to the EIP, and add my domain in the OpsWorks app settings, my domain does not resolve in the browser. What am I missing?
OpsWorks does very little to manage DNS externally. All DNS management should be done through Route53.
To start, make sure you have your nameserver (NS) record properly configured to reference your domain in your hosted zone, and also make sure that whatever DNS provider you're using (e.g. name.com, etc) is configured to point to those DNS servers.
Also, regarding this point:
I don't want to have to change my DNS records in Route53 every time
that happens, so I implementated an EIP, registered it with the
instance, and registered it with OpsWorks.
You should really be using an elastic load balancer for this, not an elastic IP. You can associate an elastic load balancer with your OpsWorks stack so that any instances launched within the OpsWorks stack will be associated with that elastic load balancer. The additional benefit is that you can have multiple servers hosting your application as you scale.
I have worked with several godaddy domains in the past. But, for the new project infrastructure I wish to setup, I am planning on registering domain names from the new Amazon's Route 53 - Domain Registration.
My question is do I also need to pay for their DNS Service?
In the past I used to configure hosted zones (CNAME records) from the GoDaddy Console, but never payed anything extra.
How will relying on Amazon effect me in terms of cost and maintenance?
Update: Alright, looks like Amazon doesn't charge for DNS queries routed to their own internal services. Refer here: Route 53 Docs - DNS Service
If somebody is using Amazon Route 53 - Domain Name and their DNS, please let me know if/how you got charged for using their DNS Service.
From the documentation, notice the final step listed in registering a domain, when you want to use an external DNS hosting provider:
(Optional) Delete the hosted zone that Amazon Route 53 created automatically when you registered your domain. This prevents you from being charged for a hosted zone that you aren't using. (emphasis added)
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html
Regarding other providers' pricing practices:
In the past I used to configure hosted zones (CNAME records) from the GoDaddy Console, but never payed anything extra.
That's fine, but you're looking at this situation upside-down. The two services -- domain registration and DNS hosting -- are separate services, but GoDaddy and many other registrars don't give you an option not to pay for DNS hosting, even if you don't use it -- it's built into their domain registration pricing. AWS tends to unbundle service components so that you only pay for the components you use.
If you are hosting services in AWS, using S3, CloudFront, or Elastic Load Balancer, you will find that Route 53's DNS hosting is the preferable option, because of the way resource records work at the apex of a domain due to the design of DNS itself. Route 53 is integrated with the other services to allow failover and redundant DNS configuration in a way that can't be accomplished with most external DNS providers.
Yes, you can use third party DNS service with domains registered in Route53 (you just have to add appropriate Name Servers)
About the pricing, it is all explained in detail here. Keep in mind that although queries to Alias records that are mapped to Elastic Load Balancers, Amazon CloudFront distributions, AWS Elastic Beanstalk environments, and Amazon S3 website buckets are free, that does bot apply to other AWS resources, including Amazon EC2 instances and Amazon RDS databases.
Also you will be charged fixed monthly amount for each hosted zone.