AWS EC2 Instance Creation: Basic Setup

This page covers the basic setup steps for creating an EC2 Linux instance on Amazon Web Services (AWS).


1. Choose an AMI (Amazon Machine Image)

What is an AMI? An AMI is a template that contains the software configuration (operating system, application server, applications, etc.) required to launch an EC2 instance. This step determines which OS you will use.

Key Considerations:

How to Choose:

When launching an instance from the AWS EC2 console, in the 'Choose an AMI' step, you can search for and select your desired OS. For example, you might choose Ubuntu Server 22.04 LTS (HVM), SSD Volume Type.


2. Decide on an Instance Type

What is an Instance Type? An instance type determines the CPU, memory, storage, and network capacity of your instance. You should select an appropriate type based on your intended use.

Key Considerations:

How to Choose:

In the 'Choose an Instance Type' step, select the instance type that matches your performance requirements. For Free Tier users, t2.micro or t3.micro should be considered first.


3. Generate and Use a Key Pair

What is a Key Pair? A key pair is a digital credential used for securely connecting to your EC2 instance. The public key is stored on AWS, and the private key is downloaded to your machine. You cannot access your instance without this private key (.pem file).

How to Generate:

How to Use:

After the instance is launched, you will use this private key file for authentication when connecting via an SSH client (terminal or PuTTY).

chmod 400 your-key-pair.pem
ssh -i "your-key-pair.pem" ubuntu@YOUR_INSTANCE_PUBLIC_IP

(`ubuntu` might be a different username depending on the AMI; e.g., Amazon Linux uses `ec2-user`)