Say my AWS domain name is ec2-1-2-3-4.ap-southeast-1.compute.amazonaws.com, can I create a domain name that is accessible from the outside world like app.ec2-1-2-3-4.ap-southeast-1.compute.amazonaws.com?
My app is accesible with the main domain name, but even after following the tutorial like this one,
I still cannot make the site accessible with sub domain in nginx.
The hostname given to your instance is owned and controlled by Amazon. It is not a wildcard and therefore you cannot add subdomains to it. Its purpose is to allow you to access individual instances before (or without) you have configured names in your own domain to resolve to the instances.
You can make subdomains in domains that you control, and add the appropriate AAAA and A records to cause them to resolve to your instance.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.