A step-by-step guide to creating a free-tier EC2 instance on AWS:
- Sign in to AWS Console:
Go to the AWS Management Console and sign in with your AWS account credentials. If you don’t have an account, you’ll need to create one. - Navigate to EC2 Dashboard:
Once logged in, navigate to the EC2 dashboard. You can find EC2 under the “Compute” section or by searching for “EC2” in the AWS services search bar. - Launch Instance:
Click on the “Launch Instance” button to start the process of creating a new instance. - Choose AMI (Amazon Machine Image):
Select an Amazon Machine Image (AMI) to use for your instance. You can choose from various options, including Amazon Linux, Ubuntu, Windows, etc. For the free tier, it’s recommended to choose an eligible AMI that qualifies for the free tier. - Choose Instance Type:
Select the instance type. For the free tier, you can choose a t2.micro instance, which is eligible for the AWS Free Tier. - Configure Instance:
Configure the instance details, including the number of instances you want to launch, network settings, subnet, IAM role, etc. For beginners, you can leave most of the settings as default. - Add Storage:
Specify the size and type of storage volume for your instance. By default, AWS provides 8 GB of General Purpose (SSD) storage for free. - Add Tags (Optional):
Optionally, you can add tags to your instance to help organize and identify it. - Configure Security Group:
Configure the security group settings to control the inbound and outbound traffic to your instance. Make sure to allow SSH (port 22) access if you plan to connect to your instance via SSH. - Review and Launch:
Review the configurations you’ve made for your instance. Once you’re satisfied, click on the “Launch” button. - Create Key Pair:
If you don’t already have a key pair, AWS will prompt you to create one. This key pair is essential for securely connecting to your instance via SSH. - Launch Instances:
After creating or selecting an existing key pair, click on the “Launch Instances” button to start launching your EC2 instance. - View Instances:
Once the instance is launched, you can view it in the EC2 dashboard. It may take a few minutes for the instance to be in the “running” state. - Connect to Your Instance:
Use the SSH client of your choice to connect to your instance using the public DNS or IP address provided by AWS, along with the private key of your key pair.
That’s it! You’ve successfully created a free-tier EC2 instance on AWS. Remember to terminate your instance when you’re done to avoid incurring additional charges.