Setting up AWS EC2

LG Networks’ take on setting up AWS EC2.

We will be looking into the usage and configuration of EC2 on AWS.

What is EC2?

Elastic Compute is an AWS service which gives their user a resizable cloud host. With EC2 you can rent computers in AWS as per your requirements and needs.

How much does it cost to use an EC2?

AWS cost calculation can get complex. For most users when they will launch an EC2 instance or EBS,S3 volume they will be renting and reserving that resource. They will be charged for the reservation, not usage.

The cost is based on time for using resources, in a specified tier. It’s like renting a car, if you’ve rented it, then it’s reserved for you, nobody else can use and since you’re renting it, you’ll pay for the time of rent.

EC2 micro instances are free, however, for more information on pricing and billing visit https://aws.amazon.com/ec2/pricing/

Regions can influence cost quite a bit, once you have decided on what kind of resources or services you’re going to need from AWS it is a wise choice to compare the cost of that resource across multiple regions. To make things easier, Amazon has a Monthly cost calculator to help users predict what their costs might be at the end of the month.

For this article, we will be taking a look at the on-demand instance. The on demands instances offer no long-term commitments, you just pay for per hour or per second of computer capacity. Recommended for low-cost applications and applications with short-term workloads.

Necessary steps for launching an EC2 Instance.

LG Networks tested by launching an Ubuntu virtual server running the latest stable version of Ubuntu OS. AMI (Amazon Machine Instance) template was used for launching the instance. The template includes a pre-configured root volume in which the OS exists. AMI also acts as a configuration for storage that’s available in an instance.

How to create an instance:

To begin

  1. Select an AMI
  2. Four options will be available
    1. Quick Start: This is a list of small basic requirements sorted by Amazon.
    2. My AMI: If you have created AMIs before, they will be listed here.
    3. AWS Marketplace: This contains AMIs which are created by software companies across the world, they are configured for certain highly specific applications.
    4. Community AMI: These AMIs are created by AWS users across the world, this has a good collection of AMIs but you have to be careful while choosing because they are region specific.

We went with Ubuntu Server 14, SSD Storage and EBS as Root Device along with HVM virtualization. Once you’re ready after making your own selection press select and move forward.

Choosing the Instance Type:

If you are not familiar with this technical jargon that Amazon uses, and to make it simpler for our readers, we would like to explain that earlier we chose an OS (Ubuntu 14) and now we’re choosing the hardware that we will run it on.

We went with General purpose m3.large with 2 vCPUs and 7.5GiB and 32GB SSD. Configure instance details when you’ve made your choice.

The t2.micro instance is free tier eligible and perfect for testing.

Configuring Instance Details.

Once an instance type is selected we now move on to next part of configuring it to suit our requirements. If you’re not an expert we would suggest leaving the values here in their default position, you can also always contact us for mentoring if you’d like some help.

  1. Number of Instances: This is perfect for launching multiple instances of the same type.
  2. Network option: is by default selected by Amazon, it’s best to leave it as it is.
  3. Shutdown behavior: determines what happens to your instances after they are shutdown from inside the AMI. To prevent accidental termination, we’d recommend keeping it on Stop.
  4. You can also Enable Terminal Protection to prevent accidental termination.

Adding a Storage.

So, till now we have selected an OS, hardware and now we move on to select some storage for our Instances.

The options displayed here will depend on what instance type we selected earlier. You can add additional storage devices by clicking on “Add New Volume”.

Explaining the Storage volume options:

EBS (elastic block storage) this type of volume is capable of linking to a single instance, EBS volumes can be designed to persist even if instance is terminated. They can then be re-used with another instance.

Shutting down an instance saves money but data written to an EBS stays indefinitely.

Instance Store: These volumes are transient, the data stored to these volumes becomes unrecoverable when the machine is stopped.

Root Device type option refers to the type of volume that’s used to store the OS itself, in our case it is UBUNTU 14. This is often a small volume and can either be a EBS or Instance Store. Having Instance Store as root Volume can give you a performance boost but with EBS you have more flexibility.

For starters we recommend going with EBS type.

Once ready click on Tagging the instance to continue.

Tagging the Instance

Once your project gets larger with multiple instances, AWS allows the functionality to tag them, this helps to keep a track of use age and cost.

Once ready, click on Configure Security Group to continue.

 

Security Group

Security Group allows your designed services and users access to your created Instance. A new Security Group can be configured every time a new instance is launched.

A Security group identifies what kind of inbound or Outbound traffic will be allowed to access the instance since inbound Traffic can be coming from anywhere and may even create security issues, it is recommended that all incoming traffic be barred except for certain services.

You can add custom rules to the traffic by giving protocols, port range. For example, if your AWS instances will be accessed on from your office then you can limit the access IP to the IP addresses of your office.

Security Group Settings can be reconfigured at any time from options but won’t take effect until the instance is re-booted.

Once ready click on Reviewing the Instance before Launch to proceed.

Reviewing the Instance before Launch.

Please review the information on the page for a final confirmation of what your instance is going to be like when it is launched.

Once the user clicks on Launch they are presented with a final configuration step “Key Pair”. Key Pair has two keys, a public one and a private one. The public key is saved by Amazon and Private Key is saved by the user for logging into the instance.

First-time instance creators should create a new key and download it on their machine for future use. Clicking on Launch Instance will take you to the Console view.

In future articles, we will be discussing how you can setup and configure an Apache Server on your instance.

This information was brought to you by LG Networks AWS team. Contact us for more information on setting up an excellent AWS server for your organization.

Free Savings Assessment
Find out just how much you could be saving!
We respect your privacy.