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.
🖥 Step 3: Name Your Instance
Give your instance a clear and descriptive name.
🖥 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.
🖥 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.
🖥 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.
🖥 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.
🖥 Step 8: Storage Settings
Leave the default storage, usually 8GB, or adjust if your use case requires more.
🖥 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.
🖥 Step 11: Connect to Your Instance via SSH
Step by Step
Put in your created key pair
🎯 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)