0

I'm creating ec2 instance with aws cli with an alpine image, but user_data not working.

aws ec2 run-instances --image-id $ami --count 1 \
    --instance-type t3.medium --key-name ClusterPacto \
    --security-group-ids $sg --subnet-id $subnet \
    --associate-public-ip-address \
    --tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=$nome}]" \
    --user-data file://user_data 
  • 1) What's in your user_data file and 2) in what sense it doesn't work? – MLu Mar 29 at 22:28