mardi 20 janvier 2015

Ec2 calling CLI from user data

When launching an ec2 instance, how does one go about using CLI commands from within a user data shell script?


When I SSH into the instance I can run CLI commands and everything works as expected.


I'm assuming the issue is that user data is executed as root. When I SSH into the instance and run the CLI commands I do so as ec2-user.


Considering I have to launch an instance every time I want to test my new user data script (this takes 3 minutes every try), I'd really appreciate not have to guess and check my way through this one.


any help is appriciate. Thank you





Aucun commentaire:

Enregistrer un commentaire