Guide: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html
Problem:
I have to make an integration between exact-online and other websites. For this I have a java-backend running on a Amazon linux 2 EC2-server, with a controller method to listen to an exact-online webhook. I get info from the webhook and send it to the other websites using their api. So I don't have any actual webpage someone can visit, it's just an 'internal' program.
Now for the webhook my controller looks like this:
@RequestMapping(value = "/WebHook", method = RequestMethod.POST)
@ResponseBody
public ResponseEntity<?> webhook(@RequestBody(required = false) ExactWebHookResponse exactWebHookResponse) {
// handle exactWebHookResponse
return new ResponseEntity<Object>(HttpStatus.OK);
}
The webhook only communicates through 'https'-protocol. So my controller should be listening to webhook-requests made to https://{Elastic-IP}/WebHook.
To initialize SSL/TLS on the Amazon server I followed above mentioned guide; I installed Apache, configured my security group etc. Everything goes fine until I try to get a CA certificate using LetsEncrypt-Certbot. When I try to get a certificate for domain: {Elastic-IP} it tells me they don't give certificates to IP-addresses. So I tried using my public DNS: ec2-{Elastic-IP}.us-east-2.compute.amazonaws.com, but they don't give certificates to 'amazonaws.com' domains.
I'm not at all familiar with SSL/TLS and certificates, so what am I doing wrong here?