0% found this document useful (0 votes)
28 views4 pages

Aman - 4 & 7

A Descriptive book for the Cloud Management using AWS's educate features like RDS, S3, Instances and many more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

Aman - 4 & 7

A Descriptive book for the Cloud Management using AWS's educate features like RDS, S3, Instances and many more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

NOIDA INSTITUTE OF ENGINEERING AND TECHNOLOGY GREATER NOIDA

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.

A Start Lab panel opens displaying the lab status.

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.

Part 1: Exploring the default VPC


Task 1: Explore the default VPC configuration

In the preceding diagram, an VPC is deployed into an AWS region.

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.

Task2: Explore a default Subnet

8. In the left navigation pane, choose Subnets.


9. From the list of subnets, choose the subnet with the IPv4 CIDR range 172.31.0.0/20.

10. Notice that the value for Auto-assign public IPv4 address is Yes, which means that it
is turned on.

Task 3: Explore the internet gateway

Aman Singh Department of CSE(IoT) 2101331550012


NOIDA INSTITUTE OF ENGINEERING AND TECHNOLOGY GREATER NOIDA
Department of CSE(IoT)
School of Computer Science & Engineering in Emerging Technologies

An internet gateway serves the following two purposes:

• To provide a target in route tables that connects to the internet.


• To perform network address translation (NAT) for instances that were assigned public
IPv4 addresses.

11. In the left navigation pane, choose Internet Gateways.


12. The internet gateway should already be selected. If it isn't, select it.

Task 4: Explore the route table

13. In the left navigation pane, choose Route Tables.

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.

There are two routes: a local route and a public route.

All public traffic (0.0.0.0/0) is routed to the internet gateway.

15. Choose the Subnet associations tab.


16. In the Subnets without explicit associations section, notice that the subnet with the
IPv4 CIDR 172.31.0.0/20 is included in the list. This is the same subnet that you
reviewed earlier.

Task 5: Explore the default security group

17. In the left navigation pane, choose Security Groups.

The default security group should already be selected.

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).

19. Choose the Inbound rules tab.


20. Choose Create security group.
21. For Security group name, enter Web-Server-SG .
22. For Description, enter Allows HTTP access .
23. Keep the VPC selection.

Aman Singh Department of CSE(IoT) 2101331550012


NOIDA INSTITUTE OF ENGINEERING AND TECHNOLOGY GREATER NOIDA
Department of CSE(IoT)
School of Computer Science & Engineering in Emerging Technologies

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.

Task 6: Deploy an EC2 instance

26. On the Services menu, choose EC2.


27. Choose Launch instance, and then choose Launch instance from the dropdown list.
Configure the following options:
o In the Name and tags pane, in the Name text box, enter Web-Server.
o Choose an Amazon Machine Image (AMI).
▪ In the Application and OS Images (Amazon Machine Image) section,
choose Amazon Linux.
o Choose an instance type:
▪ Select t2.micro.
o In the Key pair (login) section, from the Key pair name - required dropdown
list, choose Proceed without a key pair (Not recommended).

In the Network settings section, choose Edit.

For Firewall (security groups), choose Select an existing 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

# Install Apache Web Server and PHP

yum install -y httpd mysql

amazon-linux-extras install -y php7.2

# Download Lab files

Aman Singh Department of CSE(IoT) 2101331550012


NOIDA INSTITUTE OF ENGINEERING AND TECHNOLOGY GREATER NOIDA
Department of CSE(IoT)
School of Computer Science & Engineering in Emerging Technologies

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

unzip inventory-app.zip -d /var/www/html/

# Download and install the AWS SDK for PHP

wget https://github.com/aws/aws-sdk-php/releases/download/3.62.3/aws.zip

unzip aws -d /var/www/html

# Turn on web server

chkconfig httpd on

service httpd start

In the Summary section, choose Launch instance.

A message indicates that you successfully initiated the launch of your instance.

29.Choose View all instances.

30. Wait for the application server to fully launch. It should display the following status:

Instance State: Running

You can choose to refresh occasionally to update the display.

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.

Aman Singh Department of CSE(IoT) 2101331550012

You might also like