By Cloud Soft Solutions | www.cloudsoftsol.com
Introduction
Amazon EC2 (Elastic Compute Cloud) forms the backbone of cloud computing on AWS, enabling you to launch virtual machines in minutes. Whether you’re a developer, DevOps engineer, or student, creating an EC2 instance is a must-have skill in today’s cloud-first world.
In this guide, Cloud Soft Solutions walks you through how to launch your first EC2 instance on AWS — step by step.
What is Amazon EC2?
Amazon EC2 is a secure, scalable compute service that lets you run servers in the cloud without owning physical hardware.
Key features:
- Scalability: Scale up or down based on demand
- Pay-as-you-go: Pay only for what you use
- Flexible OS: Choose Linux, Windows, or others
- AWS integration: Seamlessly works with other AWS services
Prerequisites
Before you begin, ensure you have:
- An AWS account (Free Tier eligible)
- A browser with internet access
- Basic understanding of cloud concepts
Step-by-Step EC2 Instance Creation
Step 1: Log in to AWS Console
Visit https://console.aws.amazon.com and sign in using your root or IAM credentials.
Step 2: Open the EC2 Dashboard
- Search for EC2 in the AWS Management Console.
- Click EC2 to enter the EC2 Dashboard.
Step 3: Launch an Instance
- Click Launch Instances.
- Provide a Name for your instance.
Step 4: Choose an Amazon Machine Image (AMI)
- Select Amazon Linux 2, Ubuntu, or Windows AMI.
- Choose an AMI labeled Free tier eligible if you're using the Free Tier.
Step 5: Choose an Instance Type
- Select t2.micro or t3.micro (Free Tier options).
- Click Next.
Step 6: Configure Key Pair (Login)
- Create a new key pair (e.g.,
cloudsoft-key) or select an existing one. - Download the .pem file and store it safely — it’s required for SSH/RDP access.
Step 7: Network Settings
- Use the default VPC and subnet.
- Configure Security Group:
- Allow SSH (port 22) for Linux
- Allow RDP (port 3389) for Windows
Step 8: Storage
- Default: 8GB General Purpose SSD (gp2)
- Adjust size if needed.
Step 9: Launch the Instance
Click Launch Instance and wait for initialization.
Step 10: Connect to Your Instance
- Go to Instances → Select Instance → Connect
- For Linux:
Launch Your First EC2 Instance — Step by Step
- Sign in to the AWS Console and open the EC2 service; pick your region (e.g., Mumbai
ap-south-1). - Click Launch instance and give it a name.
- Choose an AMI — Amazon Linux 2023 or Ubuntu LTS are free-tier eligible.
- Select an instance type — t2.micro / t3.micro for free tier.
- Create or select a key pair (.pem) — you'll need it to SSH in. Download and keep it safe.
- Configure the security group: allow SSH (22) from your IP, and HTTP (80)/HTTPS (443) if hosting a site.
- Set storage (8–30 GB gp3 is within free tier).
- Review and Launch instance.
Connect to your instance
- EC2 Instance Connect (browser-based, no key needed) — easiest.
- SSH:
ssh -i your-key.pem ec2-user@<public-ip>(useubuntu@for Ubuntu AMIs). Runchmod 400 your-key.pemfirst.
Good practices
- Stop the instance when idle to save free-tier hours; terminate to remove it entirely.
- Use an Elastic IP only if you need a stable public IP (free while attached to a running instance).
- Never open SSH to
0.0.0.0/0in production; restrict by IP and use IAM + SSM Session Manager.
Don't have an account yet? Start with our AWS Free Tier sign-up guide, then go deeper with AWS training and AWS interview questions.


