amazon web services - how to pass in the user-data when launching AWS instances using CLI -
i'm using aws cli launch instances, , command is: aws ec2 run-instances
what i'm expecting pass in script user-data. so, did: data=base64 ./my_script
on mac osx, , pass data by: aws ec2 run-instances --user-data $data
but, nothing happened after instance launched
so, how should do?
thanks!!
there no need base64 encode data yourself.
you can prefix file name/path file://
so,
aws ec2 run-instances --user-data file://my_script
or
aws ec2 run-instances --user-data file:///full/path/to/my_script
Comments
Post a Comment