Introduction

Amazon Web Services (AWS) offers scalable, enterprise-level IT resources, ranging from free tier servers to custom managed solutions on a global scale. Their services enable engineers to rapidly deploy and manage the resources via the AWS Management Console. We’ll be covering a few of these services over the next few months, but today we’ll focus on EC2.

EC2 – Server Management

EC2 provides console managers the means to deploy, monitor, and scale various server resources. In the image below, we are introduced to the EC2 management console. From here, you can launch new servers, referred to as instances by AWS, view resources analytics, and monitor service health.

For the purposes of this post, we will walk through the new instance launch process by looking at the available options and what they mean.  We will initiate a new instance by click the “Launch Instance” button on the EC2 Dashboard. There are several ways to launch an instance throughout the EC2 interface.

Step 1: Choose an Amazon Machine Image (AMI)

The first step is to select an operating system. AWS offers a dozen or so different options including their own propriety Linux-based image, Ubuntu, Windows, and various versions of each. For this demonstration, we will be selecting Ubuntu 20.04 LTS, which at the time of this writing is the latest LTS version.

Step 2: Choose Instance Type

Next, we will choose the instance type. The type refers to the number of CPUs, Memory (in GB), and other resource configuration options. Most open source-based images will have a free tier level, as picture in the image below:

Step 3: Configure Instance Details

The configuration details are mostly arbitrary and can differ depending on what you need for your purpose. The main detail we would like to highlight here to the “Auto-assign Public IP”. For our purposes, we usually need this enabled as we need an IP address assigned to SSH into the server and complete setup.

However, for production purposes, we almost always use an Elastic IP address so the IP is not lost in the event we need to shutdown the server.

Step 4: Add Storage

Adding storage is simple. The default size is 8 GB, but in our experience, that can run out quickly. Depending on what you are doing with your server, we highly recommend increasing the initial volume size to at least 20 GB since storage space is very inexpensive with AWS.

Step 5: Add Tags

Tags are another arbitrary utility that allows the administrator means of categorizing resources. Merit Technologies usually adds a “BillTo” tag to separate various client resources. This makes our Cost Explorer reporting must easy to run on a per client basis.

Step 6: Configure Security Group

Setting up an initial security group allows admins to manage server accessibility. You can go back and edit these rules at any point in time, but the launch wizard is a good place to add some basic rules that are almost always needed.

For our purpose of setting up a web application, we will need 3 rules:

  1. SSH – Restricting to only “My IP”, opens port 22
  2. HTTP – Open to the world, opens port 80
  3. HTTP – Open to the world, opens port 443

Most admins will always need rule #1 or another way to gain admin access to the server. Rules 2 & 3 might vary depending on what you plan to do with your server.

Step 7: Review and Launch

The final step is to review all the various configuration settings. If everything looks good, click the blue “Launch” button. This will bring up a prompt to setup or use an existing SSH key pair. This part is critical. If you lose this key, you will not be able to access your server.

AWS will make sure you download the key before launching the server. You can use an existing key or create a new one. For this tutorial, we’ll create a new key. Once the key has downloaded, click “Launch Instances”.

Congratulations, you have launched a new AWS EC2 server. You will be redirect to the EC2 list of servers where you can now monitor you server.

Leave a Comment

You must be logged in to post a comment.