Avery235
Avery235

Reputation: 5306

AWS SSL cert for server api

I use netlify.com for the front-end (React.js) which automatically comes with https, but it's not allowing me to make https requests to the express server as my express server does not have a cert.

How do I get a cert for my express server (which serves only RESTFUL APIs) with AWS Certificate Manager? It's asking for domain name but all I have is a static IP for the AWS EC2 instance.

If AWS Certificate Manager is not suitable for this case, what's the easiest free way to get a cert and set it up for the Express server? I'm running the Express server directly via node, without apache/nginx.

Upvotes: 0

Views: 897

Answers (1)

Mark B
Mark B

Reputation: 200436

You will have to point a domain name to the REST API server. You can't request an SSL certificate for an IP address. Do you not own a domain name that is pointing to your React app already? You should setup a subdomain like api.example.com that points to your API server, and then request an Amazon SSL certificate for that subdomain.

Note, you must be using an Elastic Load Balancer or CloudFront to use an Amazon Certificate Manager SSL certificate. You can't install it directly on an EC2 instance.

Upvotes: 2

Related Questions