Here's a quick tip on how to configure a Windows Amazon instance to successfully respond to ping requests.

By default an EC2 security group does not allow ICMP ping requests, and in some cases the internal Windows firewall will also block it. You therefore should check both settings if you want to be able to ping your EC2 Windows instance.

Step 1: Check Windows Firewall Settings
To enable the Windows firewall to allow ping request check that under 'Inbound Rules' the setting 'File and Printer Sharing (Echo Request - ICMPv4-In)' is enabled. The icon should turn green if the rule is enabled.
Alternatively you can use the commandline option:

view plain
1netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow

This should take care of the Windows firewall.

Step 2: Configure EC2 Security Group
EC2 security groups use the so-called Classless Inter-Domain Routing method to configure IPs and routes. You can read more about it on Wikipedia and I will not pretend that I know all the details, but what I do know is that the syntax to specify a single IP as part of whichever rule you are trying to set up is [the_IP]/32. The /32 part means that the first 32 bits (which in case of IPv4 addresses means all of them) have to match for the rule to match. So just remember: to create a particular rule for one IP address only just specify the IP followed by a forward slash.

On the other hand to allow all IPs (I tend to grant access to services normally to one IP or all) you would specify

So first you should create a custom ICMP rule of type Echo Request as shown in the first image.

Next you specify the IP address (or optional CIDR blocks) and then apply your rule as shown in the second image.

Your pings to the instance should now work.