Automatically install software to your new AWS EC2 instances

Matt NisanTechnical Tips1 Comment

When creating an AWS EC2 instance, you can configure a startup script or list of commands to be automatically executed. The commands are performed immediately following initialization and the process allows you to start multiple configured instances. This saves time by having programs install themselves before you have ever even needed to log in.

The Advanced Details section in Step 6 of creating a new EC2 instance in the AWS dashboard provides a text area to enter all commands. The example in the photo shows some commands to update and install MySQL Database on an enterprise Linux instance. This allows a user to have access to an up to date system and database on first use.

Screen Shot 2015-06-10 at 11.24.15 AM

The process also works for all operating systems including the ability to provide Windows Server a set of Powershell commands to install Active Directory and IIS webserver on first start.

Using these tools, you could create several instances on a hosted network that include a database, applications, and web-server; all pre-installed and ready for use in a matter of minutes.

One Comment on “Automatically install software to your new AWS EC2 instances”

  1. Hey, if I want to use an image containing 2 major programs without having to install them and all the related softwares to them what is the best option for me? to install once on any instance I have and then create a AMI out of thiz instance for later use in other instances? or should I make an image of an existing machine I already have those programs installed on and make a AMI out of it if possible?

Leave a Reply

Your email address will not be published. Required fields are marked *