DEV Community

Oluwatunmise
Oluwatunmise

Posted on

AWS Made Simple: How to Launch Your First EC2 Instance (No Stress Guide)

Spinning up your first EC2 instance can feel like trying to start a spaceship ๐Ÿš€. But donโ€™t worry, you donโ€™t need to be an astronaut (or a DevOps wizard) to do it!

โœ…Prerequisites
Before you begin, make sure you have:

  • An AWS account

  • Access to the AWS Management Console

  • An SSH key pair (or be ready to create one)

๐Ÿ–ฅ Step 1: Log in to the AWS Management Console
Go to the AWS Console and search for EC2 in the search bar.

๐Ÿ–ฅ Step 2: Click on "Launch Instance"

On the EC2 Dashboard, click the Launch instance button to begin the setup.

Launch Instance

๐Ÿ–ฅ Step 3: Name Your Instance

Give your instance a clear and descriptive name.

Name your Instance

๐Ÿ–ฅ Step 4: Choose an Amazon Machine Image (AMI)

Select an AMI (Amazon Machine Image). For beginners, the Amazon Ubuntu (Free tier eligible) is a safe choice.

Choosing an AMI

๐Ÿ–ฅ Step 5: Choose an Instance Type

Pick the instance type. The t2.micro or t3.micro is free tier eligible and works well for testing.

Selecting Instance Type

๐Ÿ–ฅ Step 6: Configure Key Pair
Select an existing key pair or create a new one. This will be used later to connect via SSH.

โš ๏ธ Save the .pem file securely because you wonโ€™t be able to download it again.

Configure Key Pair

Configure Key Pair

Configure Key Pair

๐Ÿ–ฅ Step 7: Configure Network Settings

In Network settings, make sure to allow SSH (port 22) so you can connect, and optionally HTTP and HTTPS if you are running a web app.

Configure Network Settings

๐Ÿ–ฅ Step 8: Storage Settings

Leave the default storage, usually 8GB, or adjust if your use case requires more.

Storage Settings

๐Ÿ–ฅ Step 9: Launch the Instance
Review your configuration and click Launch instance ๐ŸŽ‰

๐Ÿ–ฅ Step 10: Verify Instance is Running

Go back to the EC2 Dashboard, and you should see your instance with the status Running.

Running Instance

๐Ÿ–ฅ Step 11: Connect to Your Instance via SSH
Step by Step

SSH

SSH

SSH

Put in your created key pair

SSH

SSH

๐ŸŽฏ Congratulations!

Youโ€™ve just launched and connected to your first EC2 instance! ๐Ÿฅณ

From here, you can:

  • Install a web server (sudo yum install httpd)

  • Deploy an app

  • Or just poke around and learn Linux in the cloud

๐Ÿ’ก Tip: EC2 is your gateway into AWS. Once youโ€™re comfortable, check out Auto Scaling, Elastic Load Balancers, and EBS volumes.

Top comments (0)