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=
To pass the script as a string, make sure to specify the interpreter as normal prior to your commands. Hitting enter in the open string allows for adding a new line. Ex.:
$ aws ec2 run-instances --image-id ami-16d4986e --user-data '#!/bin/bash > poweroff'