DEV Community

Cover image for Step-by-Step Guide to Setting Up Your First AWS EC2 Instance
Ankur Singh
Ankur Singh

Posted on โ€ข Edited on

6 1 1 1 1

Step-by-Step Guide to Setting Up Your First AWS EC2 Instance

Introduction

Welcome ๐Ÿ‘‹ to this blog. Did you just start the journey of AWS or did you just want to initialize or start your AWS EC2 instance? Then you are reading the correct blog. By the end of your blog, you will be able to initialize your EC2 instance & work with it. This blog contains every small step throughout the process and this blog is a one-stop solution for beginners as well as for the experienced.

Prerequisites

These are some of the prerequisites for this blog

  • Amazon AWS account
  • Your favourite web browser.

Setting up Amazon EC2 instance

In this tutorial, I am going to use the instance provided by AWS to the new users for initial 1 year with limited usage. For more information about the free tiers refer to the official documentation.

I request that all of you please read carefully about the free tier policy before launching the instance.

Let's begin to launch our instance.

Step 1: First log in to your AWS account. Then click on Services to the header of the main page followed by Compute & EC2.

Step-1-image

Step 2: Set up EC2 instance
You are now on the EC2 page. Here you can see the dashboard for the EC2 instance. Here you can get all the information related to your EC2 instance, zones & many more. You will also notice that Instances (running) is 0 because we don't have any instances running. (if you have a running instance before then it may not be 0) Now click on the Launch instance button.

  • In the name field: write the name of the EC2 instance, it can be anything depending on your choice. In my case, I am writing flask-app.
  • In the OS images section you will select Ubuntu.

Step-2-first-image

  • Please note that in the Amazon Machine Image(AMI) select the one with labelled(Free tier eligible)
  • Choose the Instance type labelled with (Free tier eligible). In my case, it is t3.micro because t2.micro is unavailable in my selected regions. In your case it can be t2.micro but select Free tier eligible
  • Key pair login You need to create a new key pair because it will help SSH with your local terminal. In this tutorial, we will not use this method. We will be using the Direct connect method. Stick to the end for more details. Select Proceed without a key pair.

Step-2-second-image

  • Then click on the Launch Instance

Step-2-third-image

Step 3: Connect to the EC2 instance

  • Go to the instances page and select the instance with the name you gave previously & then click on the Connect button. Step-3-first-image
  • Then select the EC2 instance Connect then Connect. Step-3-second-image

TADA :)

Your AWS EC2 instance is up & running.

You can get access to the terminal and now you can use your instance.

success-image

Remember to stop your EC2 instance.

Please remember to stop your EC2 instance.

You got it ๐Ÿคฉ

You have learned about initializing the AWS EC2 instance from scratch. Thanks for reading till the end. If you have any feedback, the comment section is yours.

Hire me: ankursingh91002@gmail.com
LinkedIn
Twitter

Image of Timescale

๐Ÿš€ pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applicationsโ€”without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post โ†’

Top comments (2)

Collapse
 
ankur0904 profile image
Ankur Singh โ€ข

Why comment section is so empty?

Quick question
What was your first programming language?

Collapse
 
ankur0904 profile image
Ankur Singh โ€ข

My C

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs