I tried to put the command to get the certificate but it gave me this error: An unexpected error occurred: The server will not issue certificates for the identifier :: Error creating new order :: Cannot issue for "ec2-34-237-242-160.compute-1.amazonaws.com": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy
Asked
Active
Viewed 5,511 times
2 Answers
2
Let's Encrypt blocks Amazon AWS domains because the domain names are transient and are subject to change.
https://community.letsencrypt.org/t/policy-forbids-issuing-for-name-on-amazon-ec2-domain/12692/4

AWS PS
- 4,420
- 1
- 9
- 22
2
Here's an alternative
- Create a subdomain (api.example.com) for your domain (example.com)
- Install a reverse proxy (like nginx) on your ec2 instance
- Configure SSL for the reverse proxy.
- Retain SSL for the app on your ec2 instance as usual.
- Redirect https (and probably http also) traffic to your app in the reverse proxy (like nginx) conf.

Naveen Karnam
- 433
- 2
- 9
- 26