Aman - 4 & 7
Aman - 4 & 7
Department of CSE(IoT)
School of Computer Science & Engineering in Emerging Technologies
Experiment – 4
Aim: - Build your VPC and deploy an EC2 instance with a Web
Server.
Accessing the AWS Management Console
1. At the top of these instructions, choose Start Lab to launch your lab.
2. Wait until you see the message Lab status: ready, and then choose X to close the
Start Lab panel.
3. At the top of these instructions, choose AWS .
4. Arrange the AWS Management Console tab so that it displays alongside these
instructions. Ideally, you should be able to see both browser tabs at the same time to
make it easier to follow the lab steps.
5. In the AWS Management Console on the Services menu, enter VPC. From the search
results, choose VPC.
6. In the left navigation pane, choose Your VPCs.
There is a default VPC that is provided so that you can launch resources as soon as
you start using AWS.
7. Notice that the default VPC is configured with the CIDR range of 172.31.0.0/16.
10. Notice that the value for Auto-assign public IPv4 address is Yes, which means that it
is turned on.
One route table is displayed, and it is associated with the default VPC.
14. In the lower half of the page, choose the Routes tab.
18. In the lower half of the page, choose the Outbound rules tab.
You should find one rule. This rule allows All protocols and All port ranges to send
traffic to any IP address (0.0.0.0/0).
24. In the Inbound rules section, choose Add rule, and then configure the following
settings:
o For Type, choose HTTP.
o From the Source type dropdown list, choose Anywhere IPv4.
o For Description, enter Allow web access.
25. Choose Create security group.
In the Common security groups dropdown list, choose the security group named Web-
Server-SG.
In the Advanced Details section, for IAM instance profile, choose Work-Role.
In the Advanced Details section, copy the following commands, and paste them into the
User data text box:
#!/bin/bash
wget https://aws-tc-largeobjects.s3.us-west-2.amazonaws.com/CUR-TF-100-EDNETW-
60961/1-lab-getting-started-vpc/s3/inventory-app.zip
wget https://github.com/aws/aws-sdk-php/releases/download/3.62.3/aws.zip
chkconfig httpd on
A message indicates that you successfully initiated the launch of your instance.
30. Wait for the application server to fully launch. It should display the following status:
30.Select Webserver.
31. From the Details tab, copy the Public IPv4 address.
32. Open a new browser tab, paste the IP address that you just copied, and then press Enter.
If you configured the VPC correctly, the Inventory application and this message should
appear: Please configure Settings to connect to database. You have not configured any
database settings yet, but the appearance of the Inventory application demonstrates that
the public subnet was correctly configured.