'Spoofed ICMP packet with scapy isnt being sent

So I have a AWS Virtual Private Server(VPS). And I am trying to see if I can make a ICMP echo-request in scapy(python) but spoof the source IP address. The packet gets successfully sent without the "src" parameter but when I try to include some other IP, it doesn't even get sent at all. I am trying this between 2 Virtual Private servers. When I listen to the targets machine, I can only see traffic that isn't spoofed. I tried changing my interface to see if that worked but it didn't.

Here's the code

from scapy.all import *

send(IP(src="1.1.1.1",dst="{serverIP}")/ICMP(), iface="eth0)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source