I am able to easily create instances using the AWS Java API from a snapshot that I have created in the environment using runInstances(...)
. I have the snapshot set up in such a way that it auto-launches a set of processes and other things so that I have a fully functional configuration.
What I would like to do, is have the instance automatically run a command I configure and set a launch time WITHOUT POLLING. Is there any functionality to do this?
Right now I am polling for when it becomes available using the Java Secure Channel library; however, I would prefer to not have to worry about it and just let AWS handle it if at all possible.
The command changes at launch time depending on how/when things run, so I may need to execute a command such as:
SomeBashScript.sh -e SOME_ID some_command