How to set ping response of AWS ec2 instance?
When we created a new instance in aws ec2, by default aws security group block all protocol and port. 

AWS security groups block ICMP (including ping, traceroute, etc.) by default. You need to explicitly enable it.

So, enable ICMP protocol (ping response) follow below steps.

Go to EC2 Dashboard and click "Running Instances"

on "Security Groups", select the group of your instance which you need to add security.

click on the "Inbound" tab

Click "Edit" Button (It will open a popup window)

click "Add Rule"

Select the "Custom ICMP rule - IPv4" as Type

Select "Echo Request" as the Protocol (Port Range by default show as "N/A)

Enter the "0.0.0.0/0" as Source

Click "Save"