Creating Ec2 Instance
Creating Ec2 Instance
Number of Instances: It defines how many EC2 instances you want to create. I leave
it as 1 as I want to create only one instance.
Purchasing Option: In the purchasing option, you need to set the price, request
from, request to, and persistent request. Right now, I leave it as unchecked.
Tenancy: Click on the Shared-Run a shared hardware instance from the dropdown menu
as we are sharing hardware.
Network: Choose your network, set it as default, i.e., vpc-dacbc4b2 (default) where
vpc is a virtual private cloud where we can launch the AWS resources such as EC2
instances in a virtual cloud.
Shutdown behavior: It defines the behavior of the instance type. You can either
stop or terminate the instance when you shut down the Linux machine. Now, I leave
it as Stop.
Monitoring: We can monitor things such as CPU utilization. Right now, I uncheck the
Monitoring.
User data: In Advanced details, you can pass the bootstrap scripts to EC2 instance.
You can tell them to download PHP, Apache, install the Apache, etc.
Now, add the EBS volume and attach it to the EC2 instance. Root is the default EBS
volume. Click on the Next.
Creating an EC2 instance
Volume Type: We select the Magnetic (standard) as it is the only disk which is
bootable.
Configure Security Group. The security group allows some specific traffic to access
your instance.
Creating an EC2 instance
Review an EC2 instance that you have just configured, and then click on the Launch
button.
Creating an EC2 instance
Create a new key pair and enter the name of the key pair. Download the Key pair.
Creating an EC2 instance
Click on the Launch Instances button.
Creating an EC2 instance
To use an EC2 instance in Windows, you need to install both Putty and PuttyKeyGen.
Download the Putty and PuttyKeyGen.
Creating an EC2 instance
Download the putty.exe and puttygen.exe file.
Creating an EC2 instance
In order to use the key-pair which we have downloaded previously, we need to
convert the pem file to ppk file. Puttygen is used to convert the pem file to ppk
file.
Open the Puttygen software.
Click on the Load.
Creating an EC2 instance
Open the key-pair file, i.e., ec2instance.pem.
Creating an EC2 instance
Click on the OK button.
Creating an EC2 instance
Click on the Save private key. Change the file extension from pem to ppk.
Creating an EC2 instance
Click on the Save button.
Move to the download directory where the ppk file is downloaded.
Creating an EC2 instance
Open the Putty.
Creating an EC2 instance
Move to the EC2 instance that you have created and copy its IP address.
Creating an EC2 instance
Now, move to the Putty configuration and type ec2user@, and then paste the IP
address that you have copied in a previous step. Copy the Host Name in Saved
Sessions.
Creating an EC2 instance
Now, your Host Name is saved in the default settings.
Click on the SSH category appearing on the left side of the Putty, then click on
the Auth.
Creating an EC2 instance
Click on the Browse to open the ppk file.
Creating an EC2 instance
Move to the Session category, click on the Save to save the settings.
Creating an EC2 instance
Click on the Open button to open the Putty window.
Creating an EC2 instance
The above screen shows that we are connected to the EC2 instance.
Run the command sudo su, and then run the command yum update -y to update the EC2
instance.
Creating an EC2 instance
Note: sudo su is a command which is used to provide the privileges to the root
level.
Now, we install the apache web server to ensure that an EC2 instance becomes a web
server by running a command yum install httpd -y.
Creating an EC2 instance
Run the command cd /var/www/html.
Creating an EC2 instance
To list the files available in the html folder, run the command ls.
Creating an EC2 instance
We observe that on running the command ls, we do not get any output. It means that
it does not contain any file.
We create a text editor, and the text editor is created by running the command nano
index.html where index.html is the name of the web page.
Creating an EC2 instance
The text editor is shown below where we write the HTML code.
Creating an EC2 instance
After writing the HTML code, press ctrl+X to exit, then press 'Y' to save the page
and press Enter.
Start the Apache server by running the command service httpd start.
Creating an EC2 instance
Go to the web browser and paste the IP address which is used to connect to your EC2
instance. You will see the web page that you have created.
Creating an EC2 instance
Next Topic#
← PrevNext →
SPSS tutorial
SPSS
Swagger tutorial
Swagger
T-SQL tutorial
Transact-SQL
Tumblr tutorial
Tumblr
React tutorial
ReactJS
Regex tutorial
Regex
R Programming tutorial
R Programming
RxJS tutorial
RxJS
Keras tutorial
Keras
Preparation
Aptitude
Aptitude
Logical Reasoning
Reasoning
Verbal Ability
Verbal Ability
Interview Questions
Interview Questions
Trending Technologies
Artificial Intelligence Tutorial
Artificial Intelligence
AWS Tutorial
AWS
Selenium tutorial
Selenium
Hadoop tutorial
Hadoop
ReactJS Tutorial
ReactJS
Angular 7 Tutorial
Angular 7
Blockchain Tutorial
Blockchain
Git Tutorial
Git
DevOps Tutorial
DevOps
B.Tech / MCA
DBMS tutorial
DBMS
DAA tutorial
DAA
Automata Tutorial
Automata
C Language tutorial
C Programming
C++ tutorial
C++
Java tutorial
Java
Python tutorial
Python
List of Programs
Programs
Javatpoint Services
JavaTpoint offers too many high quality services. Mail us on [email protected], to
get more information about given services.
Website Designing
Website Development
Java Development
PHP Development
WordPress
Graphic Designing
Logo
Digital Marketing
On Page and Off Page SEO
PPC
Content Development
Corporate Training
Classroom and Online Training
Data Entry
Training For College Campus
JavaTpoint offers college campus training on Core Java, Advance Java, .Net,
Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at
[email protected].
Duration: 1 week to 2 week
Like/Subscribe us for latest updates or newsletter RSS Feed Subscribe to Get Email
Alerts Facebook Page Twitter Page YouTube Blog Page