The best way to do this is to use CloudFormation to create an auto scale group. In the LaunchConfiguration type you can add your files from S3 and instruct IIS to install the apps. For example:
"WebAsSpotLaunchConfiguration" : {
"Type" : "AWS::AutoScaling::LaunchConfiguration",
"Metadata" : {
"AWS::CloudFormation::Init" : {
"config" : {
"sources" : {
"C:\\inetpub\\wwwroot" : {
"Fn::Join" : [
"/",
[
"http://s3.amazonaws.com",
{
"Ref" : "DeployS3Bucket"
},
{
"Ref" : "DeployWebS3Key"
}
]
]
}
},
"commands" : {
"1-add-app-1" : {
"command" : "C:\\Windows\\System32\\inetsrv\\appcmd add app /site.name:MySite /path:/app1 /physicalPath:C:\inetpub\mysite\app1",
"waitAfterCompletion" : "0"
},
"2-add-app-2" : {
"command" : "C:\\Windows\\System32\\inetsrv\\appcmd add app /site.name:MySite /path:/app2 /physicalPath:C:\inetpub\mysite\app2",
"waitAfterCompletion" : "0"
}
}
}
},
I realize that if you don't already know CloudFormation, this may take some time to setup. But it's worth the investment in my opinion.