Pass User Data to AWS client
- by bearrito
Has anyone successful passed user data to the AWS CLI ?
I have tried various incantations of the following but it does not work.
Docs say string must be base64 encoded : http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html
The instance logs never indicate the script is executed and chef is installed.
aws ec2 run-instances --image-id ami-a73264ce --count 1 --instance-type t1.micro --key-name scrubbed --iam-instance-profile Arn=arn:aws:iam::scrubbed:instance-profile/scrubbed --user-data $(base64 chef_user_data.sh --wrap=0)
chef_user_data.sh
#!/bin/bash
curl -L https://www.opscode.com/chef/install.sh | sudo bash