Why isn't my webhook triggering with a public IP on AWS?

I have a https listener running on AWS Ec2 instance (with public IP). I created a web hook with this IP but I am not receiving any web hook trigger from shopify. I tested listener with postman with similar body that shopify is expected to deliver and found perfectly working.

Do we need DNS name when registering web hook? Public IP won’t work?

Yes, you’d need a domain name for web hooks to work. If you don’t want to pay for a domain name, I’d recommend spinning up the EC2 instance using Elastic Beanstalk on AWS (which doesn’t cost you anything extra) and it gives you a free domain name (a subdomain under an elastic beanstalk domain, which is totally useable for your use case). Use this to register your webhook.