Skip to content

Amazon Web Services

James A Henriquez edited this page Dec 6, 2023 · 29 revisions

What is Amazon Webservices?

(To fill in later)

What is AWS EC2?

Amazon EC2, otherwise known as Amazon Elastic Compute Cloud is one of their most well known services. What EC2 allows you to do Amazon provides a secure and resizable compute capacity in the cloud. This simply means that they will provide you with a virtual server/machine that would represent a physical server so that we may be able to deploy our applications. This is a great alternative to acquiring our own hardware and connecting to a network to create our server.

What are the benefits of AWS EC2?

  • Cost-effective: Amazon EC2 allows a pay-as-you-go pricing model, which means you, the user, are in control of the costs on server resources.

  • Moldable: EC2 allows a variety of different instance types (Instance types comprise different combinations of CPU, memory, storage, and network capacity) and operating systems, meaning that it is almost fully customizable to fit your needs.

  • Scalable: EC2 is capable of adjusting computing resources as the website gains or diminishes in demand.

  • Security: EC2 provides different security features such as Virtual Private Cloud, which allows us to safely secure our website and data we receive.

  • Reliable: Because EC2 is under AWS, there is a huge reliability factor, and can reduce the risk of the server having downtime.

What are some issues we may experience when using EC2?

  • Complex: Having to set up and manage EC2 instances may be unfamiliar to us, and users have stated that the documentation isn’t always clear and can be quite confusing to understand.

  • Overhead: There could be a mismanagement of resources and optimization, which can lead to unnecessary costs.

  • Maintenance: There will need to be maintenance to ensure the security of our EC2 instances

What do we receive from the free tier?

With AWS free tier, you are given 750 hours of Linux and Windows t2.micro instances each month for up to one year. To stay within the free tier we must only use EC2 Micro instances.

What is T2 Exactly?

T2 instances in particular are Burstable Performance Instances. This means that they provide a baseline level of CPU performance and have the ability to burst above said baseline. T2 instances can sustain high CPU performance for a long time and for most general-purpose workloads will be sufficient enough without any additional charges. If one would need to run at a higher CPU utilization it could do so but it comes with an additional charge of 5 cents per vCPU-hour. Ability to burst are governed using CPU Credits and increase depending on the instance of T2.

T2.micro comapred with other instances of T2

Instance vCPU CPU Credits / hour Mem (GiB) Storage Network Performance
t2.nano 1 3 0.5 EBS-Only Low
t2.micro 1 6 1 EBS-Only Low to Moderate
t2.small 1 12 2 EBS-Only Low to Moderate
t2.medium 2 24 4 EBS-Only Low to Moderate
t2.large 2 36 8 EBS-Only Low to Moderate
t2.xlarge 4 54 16 EBS-Only Moderate
t2.2xlarge 8 81 32 EBS-Only Moderate

How to setup an EC2 Instance

To setup an EC2 instance you must first create an AWS account or sign into an already existing one.

Once done you will enter the console home, from there you can search up and go to the EC2 page.

image

From there you should now be able be greeted to the EC2 Dashboard where you will lots of information that will be talked about later.

For now you should click Launch Instance (clearly highlighted in the Amazon orange color)

image

On the redirected page, first enter the name of the server, it could be whatever you want, for our project I will use the name SDP32.

image

Next option is to choose an AMI. AMI or Amazon Machine Image is a template that contains a certain software configuration that are commonplace in public use.

image

For the Instance type we will be using t2.micro for the reasons discussed earlier.

image

Next you are going to create a key pair. A key pair is a combination of a public key that is used to encrypt data, and a private key that is used to decrypt the same data.

image

Once you clicked "create a new key pair," give you key pair a name that will be downloaded later. Next you can choose either an RSA or ED25519 algorithm of encyrption. The use of the algorithm depends on your needs. ED25519 keys are much smaller than RSA keys which makes it more efficient authentification time and storage space and is more secure. However, RSA is well established and much more used around the tech world.

For the project I will be using RSA and saving it as a .pem instead of a .ptk file format as we will be using SSH to connect to the instance, not PuTTY

image