pythonamazon-web-serviceschef-infrabotoaws-opsworks

Do I need to SSH into EC2 instance in order to start custom script with arguments, or there are some service that I don't know


I need to create an application that will do the following:

  1. Accept request via messaging system ( Done )
  2. Process request and determine what script and what type of instance is required for the job ( Done )
  3. Launch an EC2 instance
  4. Upload custom script's (probably from github or may be S3 bucket)
  5. Launch a script with a given argument.

The question is what is the most efficient way to do steps 3,4,5? Don't understand me wrong, right now I'm doing the same thing with script that does all of this

My question is really: is that the only option how to handle this type of work? or may be there is an easy way to do this? I was looking at OpsWork, and I'm not sure if this is the right thing for me. I know I can do steps 3 and 4 with it, but how about the rest? :

By the way I'm using Python, boto to communicate with AWS services.


Solution

  • Since you're already using AWS, this sounds like a perfect use case for Amazon Simple Workflow Service (http://aws.amazon.com/swf/)

    From the service description:

    Amazon SWF replaces the complexity of custom-coded workflow solutions and process automation software with a fully managed web service. This eliminates the need for developers to manage the infrastructure plumbing of process automation so they can focus their energy on the unique functionality of their application.

    It allows you to define task workflows and have workers process tasks in the workflow.

    boto has 'level1' support (low level api) for SWF: http://boto.readthedocs.org/en/2.6.0/ref/swf.html