1

I have tried booting several times an ec2 t2.nano with custom userdata, but I can't get it working, the logs say:

/var/log/cloud-init.log

helpers.py[DEBUG]: Running config-rightscale_userdata using lock (<FileLock using file '/var/lib/cloud/instances/i-b4fef82a/sem/config_rightscale_userdata'>)

[CLOUDINIT] cc_rightscale_userdata.py[DEBUG]: Failed to get raw userdata in module rightscale_userdata```

Also, I'm sure userdata is in there, running ec2metadata, I can see my shell script:

user-data: #!/bin/bash
echo "Running" > ~/running
sudo apt-get update -y
sudo apt-get install git -y

git clone https://host.git
cd dir
. setup.sh

I'm running an ubuntu instance like so:

aws ec2 run-instances --region us-east-1 --security-group-ids "sg-885493f2" "sg-aa6eadd0" "sg-e360a399" --key-name reduza-fontes --instance-type t2.nano --user-data file:///Users/lucaswxp/launch-ec2-squid.txt --image-id ami-2d39803a

Any ideas?

  • Try a different AMI. What is the rightscale relevance? – dmourati Aug 13 '16 at 4:58
  • @dmourati I'm not sure, all I saw was "Failed to get raw userdata", will try different AMI – Lucas Pelegrino Aug 13 '16 at 5:01
  • did you try doing this using the AWS console for comparison? did you try base64 encoding of the user data? does the first line literally just have #!/bin/bash (the "user-data: " part should not be part of the user data). – Skaperen Aug 13 '16 at 6:00
  • do a minimal case test with a simple use data (commands to store a file) on a generic AMI. – Skaperen Aug 13 '16 at 6:03
  • @dmourati Tried a different AMI, same. – Lucas Pelegrino Aug 15 '16 at 0:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.