Creating an instance in Amazon Web Services (AWS)
Tags: beginners, aws, cloud, frontend
Published: 2023-04-08 09:22:05

Imagine having access to over 200 fully featured services that can help your business scale and grow, all from a single platform!
That's exactly what the [Amazon Web Services] (https://aws.amazon.com/) (AWS) platform provides. With data centers located all around the world, AWS is the most comprehensive cloud platform available, offering scalable and cost-effective solutions for all kinds of businesses. 

## What are Instances
Now that you know what AWS offers, let’s find out what an instances are. 

An instance in AWS is a virtual server that you can create and manage within the AWS environment. It's like having a magical computer that lives in the cloud and can do anything you need it to do!

Instances are based on Amazon Machine Images (AMIs), which are pre-configured virtual machines that include everything from the operating system to the software applications you need. 


And the best part? With AWS, you only pay for what you use, so you can save money and resources without sacrificing performance.

## <u> Steps in creating an instance</u>

### 1. Create an account with AWS
Before you can create an instance, you need to have an account with AWS. If you already have an account, skip this step.  If you don’t, you can create a free tier here [Amazon Web Services] (https://aws.amazon.com/).
You also need to have a credit card that accepts international payments. 

_Note:A fee of $1 will be 
debited_

### 2. Navigate to EC2 dashboard 
Once you are logged into your account, you’ll see a dashboard, navigate to EC2 on the left panel. Afterwards click on instances, which leads you to a page where you can view all your instances. Click on **Launch Instance** button.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ppphugv1phfdym2vun2h.png)

### 3. Configure/Customize your instance
Once you click on the launch instance button, it leads you to a page where you can configure your instance. On this page you can do the following:

- **Name your instance**
You’ll see an input field where you can give your instance any name you like. I named mine **scavirtual**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uiegt8xa6yphsbyyp8dd.png)


- **Select the Amazon Machine Image (AMI)** 
Select the AMI that meets your needs. AWS provides a wide range of pre-configured AMIs that include various operating systems and software packages


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0kb00fcou35de2ccjby4.png)

- **Choose an instance type that meets your needs**
Choose an instance type that meets your needs in terms of computing power, memory, and storage. AWS provides a variety of instance types to choose from, depending on your workload requirements and budget.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkxc7zd8ffy7vsekpu2l.png)

- **Create a key pair**
You will be asked to choose or create a key pair, which will allow you to securely access your instance via SSH. You can give it a name you can easily recall and make sure you download it on your computer because you’ll be needing it later. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9mauh90no35x1esevakl.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxynpzmveml6fcfu8zvy.png)
- **Review** 
On the right hand side, there’s a summary panel to review all of your configurations and make sure everything is set up correctly. If you're happy with the settings, click on the "Launch" button.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18c7sqtuzqq38ospt6up.jpeg)

### 3. Launching the instance

Once you click on the launch instance button. A message will pop-up notifying you that your instance has been successfully launched.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yx7jioqqs8d2r9m2zyp3.jpeg)
### 4. Connecting your instance 
We’ll be connecting our instance using remote 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/33m794bwwsoff6lmyr0i.jpeg)

- First, click on the “Get password” button which will require us to upload the pair key we created and downloaded the other time.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/448a9isv65roodc188ih.png)

- Next we’ll be able to generate a password, copy this password as it will be required to connect to your virtual machine.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bdva189z9rznr0vayeos.jpeg)

- Afterwards, click on the download remote button.
Once it has downloaded, open it , accept the conditions. You’ll be promoted to provide a password, paste the password that was generated earlier.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9xzwn4iluo7xfzu64ipj.jpeg)

### 5.  On your virtual machine 
The screen might go blank for a while, don’t fret. Your instance will be available soon.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljx5o1pjlmb6s7o8736o.jpeg)
There you have it, a virtual windows right in your computer.
Everything you do while on the instance will be stored there.
You can exit the instance if you are done working on it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aodmdig060b3fnh6tiyb.jpeg)

### 6. Terminating the instance
Once you are done working on the instance and you are sure you no longer need it, it is important you terminate the instance to prevent you from incurring unnecessary charges for resources.
Click on instance states, navigate to terminate instance

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6rt1aogyhqsi226b4g2.png)

A notification stating that the instance has been successfully terminated.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d0l8xb9j2ndj8pvkuyj1.png)

Viola! We have successfully launched, connected and terminated an instance.