I have a AWS instance with Ubuntu 16.0.
When i use the certbot command getting the authentication error. I tried to ping the public ip and am unable to do so. Is it something to do with the aws instance not having the rights to ping.
You mean trying to ping the IP of your AWS instance? You should check what security groups you have set up. Many things drop certain ICMP requests (e.g. ping), and by default AWS instances are not accessible on any port. You must explicitly allow traffic to any ports you want to open.
thanks will check and get back to you
Could this be the primary reason for not getting the certificate or i need to check something else
It’s likely, and a very common issue, but without additional info (hint: that form with suggested questions when you created this post is there for a reason!) it’s impossible for anyone to determine the primary cause of failure.