Question:
I have developed a server app in C# (currently set up as a Console application). After debugging it on my computer, I’d like to deploy it to an EC2 instance for further testing. What is the best way to deploy the app (and continuous updates that will come while testing) to the EC2 instance? I noticed Elastic Beanstalk is a service designed exactly for this purpose, but it only seems to support ASP.NET apps.
Answer:
If you create an application using IIS under Elastic Beanstalk you can use the .ebextensions framework to run commands when you redeploy the application. Whilst this is intended for IIS related things you can use it to run arbitrary commands.
For example, you could have a command that downloads a zipfile from S3 and extracts it to a folder or download and run an installer package or a powershell script.
I did this for windows services, it’s painful because the YAML syntax of the ebextension files is easy to get wrong, but it can be done.
Eventually I was able to do 1-click deployment of my console application and/or windows services from Visual Studio using the AWS toolkit.
Look here for further information on the .ebextension commands for Windows.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-windows-ec2.html