Solution 1:

Translating a hostname to an IP address is a single call to DNS even if it’s not included in the hostname like here. If you want people to use your service they (or their computers) will eventually use the IP, you can’t hide it and there is no point trying to hide it.

However two issues with giving your users this hostname or the IP directly:

  1. The IP will change when you stop and start the instance. Hence you’ll have to update your users with the new one. Look up Elastic IP to overcome this problem.

  2. You can’t easily get a valid SSL certificate for this hostname or for an IP address. It’s better to use your own domain.

Hope that helps :)