简体   繁体   中英

Deploy https node express server to host website on AWS EC2

I'm quite new to this. I have a node-express https server that currently runs locally on my machine. My simple website runs on this https sever and make xmlhttp requests to consume some APIs (as these APIs only accept requests from https endpoint). At the moment I'm using a self signed SSL certificate.

I'd like to deploy the server with html, js files to EC2 and make it accessible to the public. My questions are

  1. Can I use AWS Certificate Manager to generate a SSL certificate, and how to use it with node-express server? Can node-express use this SSL certificate on EC2? or do I need to use this SSL certificate with Elastic Beanstalk and ELB?
  2. I did some research but the ACM documentation said an email will be sent to the registered domain owner for each domain name in the certificate request. I don't have a domain as I plan to have users access my site using IP address. What do I do in this case?

Many thanks for your help!

  1. You can't use an ACM certificate directly with NodeJS. You have to place a load balancer in front of your server and install the ACM certificate on the load balancer.

  2. The ACM service does not support SSL certificates for IP addresses, only domain names. I recommend obtaining a domain name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM