Amazon Elastic Compute Cloud (EC2) is a web service that provides scalable computing capacity in the cloud. It allows you to launch virtual servers called instances, which can run applications on them. In this tutorial, we will walk through the process of launching and configuring an EC2 instance using the AWS Management Console.
Before diving into the steps, let's understand some key concepts:
Sign in to the AWS Management Console:
Navigate to EC2 Dashboard:
Launch Instance:
Select Instance Type:
Configure Instance Details:
Add Storage:
Add Tags:
Configure Security Group:
Review and Launch:
Select Key Pair:
.pem), as it will be required to connect to your instance.Once your instance is running, you can connect to it using SSH.
Open Terminal:
Change Permissions of the Key Pair File:
chmod 400 /path/to/your-key-pair.pem
Connect via SSH:
ssh -i "/path/to/your-key-pair.pem" ec2-user@<public-ip-address>
Replace <public-ip-address> with the public IP address of your EC2 instance.
Verify Connection: You should see a message indicating that you are logged into your instance.
After connecting, you can start configuring your instance.
Update Package List:
sudo yum update -y
Install Apache Web Server:
sudo yum install httpd -y
Start Apache Service:
sudo systemctl start httpd
Enable Apache to Start on Boot:
sudo systemctl enable httpd
Verify Apache is Running: Open a web browser and navigate to your instance's public IP address. You should see the Apache test page.
Now that you have launched and configured an EC2 instance, you can explore different EC2 Instance Types based on your application requirements. Each instance type offers unique specifications to optimize performance and cost.