I am new to Amazon Ec2.If my site is down due to amazon Ec2 failure I want to display the downtime notification page.But my doubt is if Ec2 fails then I may not be access my server.So how can I handle this situation.How can I notify my end user coming through the browser?
If 'EC2 is down', implies your server is offline - meaning it can't serve pages (and, of course, you can't access it).
In order to display anything to users, in this scenario, you need something external to your EC2 instance. For example, a typical setup might have a load-balancer (e.g. HAProxy) running in front of the instances - if the instances are down, the load balancer will serve an error page. (provided the load balancer is up)
In theory it is unlikely that all of AWS goes down at the same time (but nothing is impossible). If you have multiple instances running in different regions, there is a good chance that one of them will be up, even if others go down.
On the other hand, there is another possibility, but it doesn't take effect immediately (making it a rather bad solution really). It is possible to remap your DNS settings to serve a file from S3. Unfortunately, changes to DNS take time to propagate - so there will be a delay in getting the page up, and in taking it down.
(While it might seem you could have multiple servers with multiple providers, the logistics would be considerably more difficult, and if such a setup is necessary, one must question if something more substantial is not required. You can't map the same IP to servers with different providers, so you would have to implement a change in the DNS - I suppose having a nameserver running on each, such that when one went down the other would take over is a possibility - but it isn't my area of expertise).
My suggestion, therefore, is if you are using EC2, you do have to hope that all of AWS doesn't go down. Design your setup in such a way that if any single server fails, you can remain online (e.g. use autoscaling, or if you run multiple servers, something such as Corosync/Pacemaker); and ensure that you can bring another server online in another location easily (i.e. use an elastic IP address, have an AMI saved that will function 'as is', and have (regular) good backups (e.g. EBS snapshots) that you can create EBS volumes from). This way, if you are notified (e.g. using a monitoring service such as Pingdom, or Cloudwatch alerts, etc) that your server is down (and you haven't setup something to automatically launch new servers) you will launch the AMI and associated EBS volumes in another region, and remap the elastic IP to be back online.