Amazon Web Services (AWS) is a very versatile cloud platform. It can be used for cloud storage, database hosting, e-mail services, and virtual cloud servers. One of the most important benefits of cloud is the ability to create a virtual server in a matter of minutes. While Amazon provides many templates with different server configurations, sometimes it is necessary to have machines with your own personal configurations available. Amazon allows you to create your own custom templates that allow you to create a machine based on your specific configuration. Amazon allows for creating these templates with your own hardware, OS, and software configurations. At Sparkhound, we use AWS to roll out our demo servers and testing servers. By using templates we are able to roll out various SharePoint servers without having to reconfigure SQL and SharePoint every time we need a new environment saving us time when putting together an environment
There are two types of configurations when creating templates, AMIs and JSON files. AMIs are images of our preconfigured servers that allow you to roll out a server with the same specs and software already preconfigured. These come in very handy when you have a need for development machines, demo machines, or any other need for a server that needs to be easily created. The one caveat of an AMI is it cannot be moved to another AWS account.
JSON templates are coded templates that run using a script and can be very versatile. With a JSON template you can create multiple VM’s simultaneously, connect to your network, and configure your setup using PowerShell. I will dive deeper into the JSON template in Pt. 2 of the blog.
Creating an instance
The first step to creating a template is to create your EC2 VM. From your EC2 dashboard select Launch Instance from under the Create Instance section:
Configure your instance
This will launch the VM wizard. This is where you can select form Amazon templates, community templates or your own personal templates.
In this demo I chose the Microsoft Windows Server 2012 , but any server will follow the next steps of adding your storage, processors, and connecting the server to a network.
Launch your instance
Once your server is configured, click Review and launch.
Review your new instance and launch. Your instance is now being created and you can watch the progress from the EC2 Dashboard, under the instance section.
Customize your instance
Once the image is initialized, you can launch it and make your changes. Once your changes to the server are done, shut down the server to create the AMI. To create the server find the action button at the top of the dashboard and select create an image -> Create Image.
Create your Image
You will be asked to name the image and configure the size. Once you are done, click Create Image.
Launch an AMI
To view and launch your new AMI, find the AMI section of the EC2 dashboard and create an instance from here. To launch an instance from your AMI select your AMI and click launch at the top of the screen. This will now take you through the launch instance steps that were done previously.
Congratulations you now have an AWS template! You can now create and customize your templates to for rapid deployment of servers to your AWS network. These templates will allow you to deallocate resources and redeploy only when needed helping reduce your costs when it comes to your running services. You can check out more information by clicking here. In part 2 we will cover JSON templates and how to create them.