We are starting instances, and accessing the user-data we place. But does anybody understand the internals of this operation (from Amazon\'s side)? When we pass in the user-
An easy example for everyone's understanding: If you want to create the file /tmp/testfile.txt when the machine gets started, you can simply add these two lines on the User data field.
#!/bin/bash
touch /tmp/testfile.txt
Remember to put the #!/bin/bash at the top before your commands.
When you run the instance (Linux AMI), you can see the User data field content at /var/lib/cloud/instance/user-data.txt