Using userData

4 views
Skip to first unread message

SANDER SMITH

unread,
Jun 19, 2010, 8:32:40 AM6/19/10
to typ...@googlegroups.com
I notice that on the runInstances methods of Jec2, there is a field to pass userData. I assume that this is data that I can pass in to my instance so that it can have some data to start with. One thing I can't figure out thouhg is how this data is going to manifest itself at the instance side, particularly at the application layer. For instance, my instances consist of Ubuntu running a Java servlet on Tomcat. How can my servlet access the data that I've passed in on the launch of my instance?

Barnet Wagman

unread,
Jun 19, 2010, 11:24:02 AM6/19/10
to typ...@googlegroups.com
Typica has a static method,

com.xerox.amazonws.ec2.EC2Utils.getInstanceUserdata()

that retrieves the instance user data.  Note that this method must be called on the instance - user data is not remotely accessible.

shlomo....@gmail.com

unread,
Jun 19, 2010, 2:24:47 PM6/19/10
to typ...@googlegroups.com

If you use an AMI that has the right startup hooks (such as the Canonical Ubuntu AMIs) you can use the user-data script technique.

http://alestic.com/2009/06/ec2-user-data-scripts

--
Shlomo Swidler
Cloud Computing Consultant, Developer
http://www.shlomoswidler.com/
http://www.orchestratus.com/

On Jun 19, 2010 6:24 PM, "Barnet Wagman" <b.wa...@comcast.net> wrote:

Typica has a static method,

com.xerox.amazonws.ec2.EC2Utils.getInstanceUserdata()

that retrieves the instance user data.  Note that this method must be called on the instance - user data is not remotely accessible.




SANDER SMITH wrote:
>
> I notice that on the runInstances methods of Jec2, there is a field to pa...

--
You received this message because you are subscribed to the Google Groups "typica" group.
To pos...

Reply all
Reply to author
Forward
0 new messages