Part 1 - AWS automation of installing an .exe to several EC2 instances
Hi,
If one needs to have a 3rd party software installed on several EC2 instances in AWS, there are a few ways to do that:
- Manually connect to each remote machine and install that .exe – easy but time consuming if there are 10 instances behind a load balancer
- Create a PowerShell script that can be run on all EC2 instances in the AWS Cloud – more trickier to implement in the first place but really helpful afterwards
I would go for option 2 because the benefits are substantial: centralized repository for the kits, copying/installing a kit on as many instances as you want with a touch of a button.
The architecture for the second scenario is described below:
- Upload the .exe into the S3 bucket. This will be like a central repo where you can download the kit from at anytime.
- Write a PowerShell script that downloads the .exe from the bucket into each of the EC2 instances.
- Install the .exe on each instance in silent mode.
The code for the PowerShell script can be found on my blog at this page: