EC2 instances don't understand what is the working directory when running user data. Therefore you must specify the destination when using wget
(and with many other commands):
wget -P /home/centos/testing https://validlink
Ps. Know that specifying working directory with .
doesn't work either.