Launching an EC2 Instance and Deploying a Web Server
Introduction
In this lecture, we explored how to launch an EC2 instance using the AWS Management Console and configure it with Amazon Linux 2. We also deployed a basic web server using the user data script and covered essential EC2 operations like starting, stopping, and terminating an instance.
1. Launching an EC2 Instance
Step 1: Accessing the EC2 Console
- Navigate to the AWS EC2 Console.
- Click on Instances → Launch Instances.
Step 2: Naming the Instance
- Assign a name using tags.
- Example: "My First Instance".
Step 3: Choosing an Amazon Machine Image (AMI)
- Select an operating system for the instance.
- Use Amazon Linux 2 AMI (Free Tier Eligible).
Step 4: Selecting an Instance Type
- Choose an instance type based on CPU, memory, and cost.
- Select t2.micro (Free Tier Eligible).
2. Configuring Key Pair for SSH Access
- Create a new key pair (e.g., "EC2_Tutorial").