Passing a script while starting an instance in Amazon EC2
问题 Is it possible to pass a script while I'm starting an instance? So that the instance will execute that script once its initialized? public static void startInstance(final String instanceId) { StartInstancesRequest startRequest = new StartInstancesRequest().withInstanceIds(instanceId); logger.info(String.format("Starting instance '%s':...", instanceId)); ec2.startInstances(startRequest); } Any idea? Script will be kind of startup script which I need to execute as soon as the instance is ready.