Amazon EC2- user-data through the AWS console doesn't work

1.8k views Asked by At

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?

3

There are 3 answers

0
AudioBubble On BEST ANSWER

There was a bug in the original AMI; the current Amazon Linux AMI's work with the same user-data script.

0
Rodney Quillo On

I'm sure that's newest AMI from Amazon. You can also test Ubuntu AMI from www.alestic.com.

/var/log/messages or /etc/log/syslog logs user-data executions.

0
Ryan Fernandes On

your AMI should support user-data (most alestic.com images do)