I\'m using the AWS CLI to launch instances, and the command is: aws ec2 run-instances
what i\'m expecting is to pass in a script as the user-data. so, I did: DATA=
There is no need to base64 encode the data yourself.
You can prefix a file name/path with file://
So,
aws ec2 run-instances --user-data file://my_script
or
aws ec2 run-instances --user-data file:///full/path/to/my_script