I am trying to create a new spot request using aws cli but it gives me an error if i pass a shell script as user-data to spot request
i tried this
aws ec2 request-spot-instances --spot-price "0.04" --instance-count 1 --launch-specification "{\"UserData\": \"/srv/user-data.sh\",\"InstanceType\": \"m1.small\"}"
and this gives me an error
Invalid BASE64 encoding of user data (400 response code)
and
how can i Tags my spot request with Name & Value