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-data, at what point is that data transmitted to the VM (is this a Xen feature) and where is it stored?
I first thought, it was set as the USER_DATA env var, but we can also pass it as a file. Where is that file stored? Is it generic to all instances or varies depending on AMI?
This is not a problem per se, just wanted to know how Amazon does this.
User data screenshot: http://d.pr/GZlY
The user-data is available to the instance with a simple HTTP request at this URL:
Amazon EC2 does not put this user-data on the instance directly, though many AMIs have code that instructs the instance to download and process the user-data automatically.
See also:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html