Are you eager to set up your own website but find the process overwhelming? Fear not! In this guide, we'll walk you through the steps of launching a second Amazon EC2 instance in a different Availability Zone within the same AWS region. You don't need to be an IT expert to follow along; just follow these easy steps:
Step 1: Downloading User Data
First things first, let's download the necessary user data from this link.
https://www.dropbox.com/scl/fi/9zei0b5e6849eowifqve4/user-data?rlkey=sv57yovgi264bv0fswln1yljl&dl=0
Step 2: Choosing the Right AWS Region
Make sure you've selected the correct AWS region. In the top navigation bar, set it to N. Virginia (us-east-1). Now, head to the AWS main page and use the service search bar to look for "EC2." Select EC2 from the search results.
Step 3: Launching an Instance
On the EC2 dashboard, click "Launch Instance."
Step 4: Configuring Your Instance
Type in the Instance Name, let's call it WebServer01.
Select the Application and OS Image as Amazon Linux AWS.
Choose the Amazon Free Tier eligible machine image - Amazon Linux 2 AMI (HVM).
Set the Instance Type to t2.micro.
Step 5:Instance Type
Choose Amazon Free tier eligible machine image -Amazon Linux 2AMI(HVM)
Choose Instance Type -t2.micro
Step 6:Keypair | Network and Security Settings
Choose Keypair -Proceed without a key pair (Non recommended )
Edit Network settings
1.For VPC -Choose , choose cloud-first-steps/LabVPC .
Your solution will fail if you do not choose this VPC.
2.For Subnet, choose the subnet in the us-east-1a Availability Zone
Select Create security group option
1.Type security group -Security-group-Lab
2.Type Description -HTTP security Group
3.For Type -Choose HTTP
Step 7: Storage option
In Configuration storage option -Confirmed select gp2
Step 8:Advanced Details
Expand the Advance details option
Open the user-data file in Notepad that you downloaded earlier, and then review the content.
This user data script launches a web server, using port 80, to display internal information about the instance.
The code block in your file is longer than what is displayed in the screenshot example
Step 9 :Uploading User Data
Click on "Choose file" and select the user-data file you reviewed. Make sure to review the content.
Step 10:Launching Your Instance
Review the Summary section and click on "Launch Instance."
Step 11:Checking Instance Status
In the success alert, review the message with the Instance ID. Click on "View all instances."
Step 12:Verifying Running State
In the Instances section, choose the check box to select your EC2 instance
Under Instance state, review to ensure that the instance is Running before proceeding.
After the instance state displays Running, under Public IPv4 address, click the copy icon to copy the provided address.
Step 13 : Accessing Your Website
Once the instance is running, copy the Public IPv4 address. Paste it in a new browser tab's address bar and press Enter. Voila! You should now see the details about your instance, and the user data script generates a webpage displaying internal information. Congratulations, you've successfully launched your own website on Amazon EC2! π
The user data script generates a webpage to display the instance details
If this post was helpful, please do follow and click the like button below to show your support π
_ Thank you for readingπ
_Sprasad π»β¨