Search code examples
amazon-web-serviceshttpsdnsssl-certificatesubdomain

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


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!


Solution

  • 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.