Developing AWS applications behind an authenticated HTTP proxy
===

We have to develop an application that will be deployed on AWS EC2. As part of our nightly build we would like to unit test our code locally then deploy to an AWS instance and run functional tests over the web.  

In an ideal world we would simply write a build script to use the AWS SDK to pick a suitable AMI, start an instance, login with SSH, set up the environment, FTP our program across and Bingo! However we are behind an HTTP proxy. Since we can't use SSH or FTP we've thought of three basic options. 

1: Try to add userData to our RunInstanceRequest that would cause the instance to set up our environment, download and run our program (perhaps from an AWS S3 bucket) as it starts. In Java this would be something like: 

    RunInstancesRequest runInstancesRequest = new RunInstancesRequest()
        .withInstanceType(myType)
        .withImageId(id)
        .withMinCount(min)
        .withMaxCount(max)
        .withSecurityGroupIds(mySecurityGroup)
        .withKeyName(someKey)
        .withUserData(myScript); //add our installation script

    RunInstancesResult runInstances = ec2.runInstances(runInstancesRequest);


2: Install our program on a VM locally and import the whole VM to AWS using the ec2-import-instance tool as described [here][1].

3: Jump up and down and demand a less restrictive networking environment.

We feel uneasy about (1) as it will be very difficult to debug any problems with the installation. (2) involves the transfer and conversion of a whole VM every time we deploy and (3) doesn't look promising!

Does anyone know the best way to do this?

:D
 


  [1]: http://aws.amazon.com/ec2/vmimport/