From the Amazon EC2 console (or even if I do it through API tools on a box using a file), I paste:
#!/bin/bash -ex
# tell the world what we've done!
echo 'thisisthetoken' > /home/ec2-user/testuserdata
Into the user-data text box. When the instance boots (the Amazon Linux AMI), the file is not in the directory. Am I missing something so basic?
There was a bug in the original AMI; the current Amazon Linux AMI's work with the same user-data script.