SSL Certificate for subdomain that points to different server (Amazon Web Services) - Setup - amazon-web-services

I am not into SSL at all, so bear with me please. I have no idea how to start to actually solve my problem.
Current situation:
1x Webserver with Webspace for a Website and it includes a Domain Administration, also to order SSL Certificates etc.
1x Different Webserver at Amazon Web Services with a PHP-based Software on it with Login etc.
A Subdomain that I created in the Domain Administration is pointing via DNS to the IP of the AWS.
What I need:
I want an https Connection (SSL) for the Subdomain that is pointing to the AWS so that the connection/login is secure.
My question is what I have to do on the side where I have the Domain Administration and after that what I have to do on the side of the AWS.
Thank you so much!

You have several options in hand,
If you already have a SSL certificate purchased, you can include it inside the webserver (e.g; configure apache for SSL).
If you plan to use free SSL certificates from Amazon, you can use one of the following options after creating a SSL certificate in AWS Certificate Manager.
Create a AWS CloudFront Distribution and attach the SSL certificate there while configuring an origin to forward traffic to the specific web server. However, you need to create the SSL certificate in North Virginia region and there won't be any upfront costs for CloudFront). CloudFront acts as a proxy and you can explicitly instruct to cache the static content reducing the load for web server and improving the performance.
The other option is to create a Application Load Balancer (ALB) and attach the SSL certificate there ( Create the SSL certificate in the same region) while forwarding traffic to the web server. However, this will add a monthly reoccurring costs for the ALB.

All you need to do is, on AWS ACM (AWS Certificate Manager) procure a certificate for your subdomain and use AWS ELB to use the certificate and point to the AWS webserver.
After this use the ELB IP in the DNS settings.
There are other options too like procuring the subdomain certificate and installing it on the webserver on AWS.

Related

Link domain to ALB keeping https

Currently, I have a domain(mysite.com) bought in the Google Domain, it's just a domain. My application is hosted on AWS, where I have my application deployed, the setup is quite straightforward - access to the application goes thru ALB(lb-123.com), which has no SSL configured yet. My problem is how to link the domain to ALB throughout HTTPS to my application in AWS which is accessed throughout HTTP. I should be able to access mysite.com using HTTPS and it should access lb-123.com either thru HTTP or HTTPS, but for a client, it should look like it accesses HTTPS.
ALB doesn't have an IP, only DNS - I should use the only CNAME for redirection mysite.com to lb-123.com?
Should I configure HTTTs for ALB too - If so, then what is the right way to do it? What certificate should I use? Is there any free certificate for ALB?
How usually ppl link using HTTPS their domains with any sort of backend which has only DNS name(e.g. AWS ALB)?
The easiest way to get SSL for your ALB is through AWS ACM with provides free SSL certificates:
How can I associate an ACM SSL/TLS certificate with a Classic, Application, or Network Load Balancer?
So in your case, you have to got to AWS ACM, and request a free SSL public SSL cert for your domain. Domain can be at google, it does not matter. Once you verity that you control the domain, you will get a cert issued that you can associate with the ALB.
Then you use CNAME on google to point your domain to ALB's domain.

How to get https for nodejs launched on aws ec2 instance and connected to domain using route53

I have created a nodejs app and hosted it on aws ec2.
Enabled HTTPS, HTTP in the security. I purchased a domain from an external domain provider and connected nameservers using route53.
Now, when I am opening the domain it showing not secure. How Can I make it secure. I tried listen port in 443 but then domain was not opening.
Can Someone please help how to make it secure or provide some good documentation for begineers.
If you don't want use a load balancer to front your instance, then you have to get and install a third party SSL certificate on your instance for your domain.
A popular choice are certificates from https://letsencrypt.org/ (StackOverflow uses them as well). They also provide https://certbot.eff.org/ tool for easy installation and setup of the SSL certs on a variety of operating systems and servers.

SSL Certificate with AWS Certificate Manager?

I am new on terms of every aspect of SSL certificate.
I have a architecture, where Route53 routes traffic to Load balance.
We are moving to production and we have to implement SSL certification to handle https traffic.
Where should i position the certificate in the architecture?
While searching i sow AWS Certificate Manager.
I am wondering how is it different ?
And when i buy a certificate can i use a single certificate with different account?
(Example: can i have same certificate set up for Staging and multiple production environment)
You can use the ACM to generate certifications for you.
It's totally free, if it's a public certificate, and will automatically renew when it expires.
But some security teams will require you to upload a more advanced certificate than ACM generates for you, in this case, you can buy the certificate and upload it in the ACM service. Keep in mind that it won't renew automatically and when it expires you will have to upload a new certificate.
Where should I position the certificate in the architecture?
It depends on your security requirements, but it's totally fine to create an HTTPS commutation between Client and Load Balancer, and an HTTP communication between Load Balancer and Server. In this case, you will only need a public certificate generated by ACM.
If your security requirements need to create a secure communication end-to-end (e.g. HTTPS communication between LoadBalancer and Server), you will need to install the same private certificate in all servers and upload your private certificate in ACM.
While searching I sow AWS Certificate Manager. I am wondering how is it different ?
The only difference is that you don't need no buy a certificate if you only use in Load Balancers / API Gateway, etc but if you want to download the certificate to install in your on-premise Load Balancer or in the servers, you will have to pay $400 for each certificate.
And when I buy a certificate can I use a single certificate with a different account? (Example: can I have the same certificate set up for Staging and multiple production environments)
Yes, you can. But keep in mind that you will need to create a wildcard certificate to support multiple DNS names.
The preferred service to use is AWS ACM.
You can either upload your own certificate (i.e. purchase it then upload) or have AWS generate and manage it for you.
If you let ACM manage and generate it will regenerate ahead of its expiry and handle the rotation on each attached resource.
It is important to note that an ACM certificate can only be bound to the following resources for HTTP traffic:
ELB
CloudFront
API Gateway
Once it is connected to these you can use SSL offloading (the TLS connection is terminated at the resource rather than the instance) to connecting to the backend resources over plain HTTP.
You should be aware that if you want to serve traffic directly from an EC2 you will not be able to use ACM public CA and instead would limited to one of the following:
Buy certificate and deploy to all servers
Use a service like certbot on each server
In addition you can use certificates that are hosted in IAM but this is considered legacy with less features than ACM.

Costs for AWS SSL certificate vs GoDaddy

We are running an Apache web server on a single AWS Amazon Linux EC2 instance and we want to configure HTTPS on the web server. Either we configure an application load balancer on AWS and configure HTTPS on the ELB, or we purchase an SSL/TLS certificate from GoDaddy and configure it in the web server.
Which option is best for us in terms of long-term costs?
The cost of the Go Daddy SSL ultimately comes down to the configuration such as duration of certificate and whether its single domain, multi domain or using wildcard. You also have the option for a free SSL using certbot if cost is a factor.
Application Load Balancer is not the only service that can use ACM, you can also use a CloudFront distribution in front of a server (or load balancer) and attach your ACM certificate to it.
By using ACM you will no longer have to worry about rotation of the SSL, the renewal when close to expiry or copying it to new resources that you create.
If this is a small personal project I would suggest to go with a free certbot SSL, if its professional or a project you see expanding with additional resources I would suggest using ACM as it will make SSL management across resources easier to maintain.

How is domain name used for Amazon issued SSL certificates in ACM

I created an SSL certificate last night for use with an API (Tomcat, Spring Boot) on AWS Elastic Beanstalk using instructions provided by Amazon Certificate Manager.
When creating the cert, I entered the URL of my static site that calls the API, which is hosted by GoDaddy. ACM sent an email to my URL which I opened and approve and I now see the cert as issued, by Amazon, in my certs. I am also able to select it when I configure HTTPS for my EB load balancer. I am not able to export this cert though as it isn't private.
My question is, how is domain name used? I think I'm a little confused about how to use SSL on both my API and my static site AS WELL as the small bit of static content I'll host out of Tomcat.
Thanks.
ACM certs can only be used with AWS services - Cloudfront (if the cert is issued in us-east-1) and regionally on the classic load balancer and application load balancer.
You cannot export the cert for use in other products, so if you wanted to have Tomcat handle SSL you would need to get either a commercial cert or use something like Let's Encrypt.
If you have multiple host names you want to protect, you have different options.
You can get one cert per hostname if they are running on completely separate infrastructure; you can also have multiple host names in a single cert - even if there are multiple domains; and finally you can get a wildcard cert.