未加星标

Launching an EC2 instance

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二05 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏
Launching an EC2instance
Launching an EC2 instance

Hello Everyone, in my last article Understanding Amazon EC2 terminology , we discussed the terminology used in EC2.

Now we are going to launch an EC2 instance. An EC2 instance is just a virtual computer in AWS’s data center. While launching the instance I am going to discuss each step in detail.

To follow along, login to your AWS account and select EC2 from the services section.

Let’s GetStarted

The price of instances varies in different regions and some instances are only available in certain regions.

In this case, I will be using the Asia Pacific (Mumbai) region, you may also choose this one or select US East (N. Virginia) region. You can change your region at the top right corner of the page.


Launching an EC2 instance

Now click on Launch Instance button.


Launching an EC2 instance

A. The first step is to choose the Amazon Machine Image (AMI) that will be used to launch our instance. It is like a configurable ISO file of your Operating System.

You have the option of selecting AMIs provided by AWS, AWS community AMIs, AWS marketplace or your own AMIs.

Here I am going to select the first one i.e. Amazon linux AMI.


Launching an EC2 instance

B. The second step is to choose an Instance Type. AWS provides a large number of instances to choose from depending on your use case. You can scroll down and see instances optimized for compute, graphics, memory and storage.

Each instance has a fixed number of virtual CPUs and RAM. The larger the size, more is the computing power and memory size.

I am going to select the t2.micro here since its available in the free tier.

Note-If you select any instance other than t2.micro you will charged.

After selecting the instance of your choice click on the Next: Configure Instance Details button.


Launching an EC2 instance

C. Now it’s time to configure our instance details. You can hover over the info button after each option to learn more about that option.

Number of Instances ― The total number of instances you want to launch. Purchasing Option ― You can check this checkbox to launch spot instances. Network ― You can select the VPC in which to launch this instance. Subnet ― You can specify the preferred subnet (availability zone) in which to launch this instance. Auto-assign Public IP ― When this option is enabled your EC2 instance gets a public IP. You can then host a website on this server and access it via instance’s public IP. Placement Group ― You can add this instance to a placement group by selecting this option. Capacity Reservation ― Using this option you can reserve capacity of your instance in an availability zone. Leave this option as default. IAM role ― You can assign an IAM role to this instance to allow it to access other AWS services without storing access keys on the instance. Shutdown behavior ― You can stop or terminate an instance when an OS-level shutdown is performed. Enable Termination Protection ― Selecting this option will prevent you from accidentally terminating your instances. You will have to disable this option to terminate an instance. Monitoring ― Checking this option will enable Cloudwatch detailed monitoring. Detailed monitoring logs your instance’s performance metrics every 1 minute as opposed to 5 minutes for basic monitoring. Additional charges will be applied if you select this option. Tenancy ― By default your instances are hosted on a shared host. You can select dedicated instance or dedicated host to comply with your license but you will have to pay additional charges. Leave this option as shared. T2 Unlimited ― Allows your instance to burst CPU utilization in case of high traffic. Additional charges may apply when you select this option.

Under the Advanced Details section at the bottom of the page you have a User data text field. You can use it to run configuration scripts or commands to configure your instance.

These scripts or commands will run as soon as your instance starts the first time.

Now click Next: Add Storage button.


Launching an EC2 instance

D. It’s time to add some storage to our instance. The first volume that will be attached to your instance will be a Root volume. You can set its size (default is 8 GB) and it’s volume type.

You can select whether to delete this volume when an instance is terminated. By default root volumes are deleted on termination and cannot be encrypted.

You can add additional volumes using the Add New Volume button. Additional volumes can be encrypted and are not deleted on termination by default.

For the root volume you have three options for Volume type -

General Purpose SSD (gp2) Provisioned IOPS SSD (io1) Magnetic (standard)

For other volumes you have two additional options along with the above three-

Throughput Optimized HDD (st1) Cold HDD (sc1)

Usually SSD type volumes are faster and expensive than HDD type volumes.

I am not going to make any changes here so click Next: Add Tags button.


Launching an EC2 instance

E. Here we can add tags to our instance. A tag are just key-value pair.

Tags can be used to group instances by departments and teams. They can be used to search for resources across an AWS account.

They can also help in managing costs of resources.

Here I am adding a single tag with Key of “Name” and Value as “My First Instance”.

Now click on Next: Configure Security Group.


Launching an EC2 instance

F. Now we are going to configure our security group. A security group acts as a firewall for our instances. We can use it to open different ports for different applications.

Here I am opening the SSH port since we will be logging in to our instance once it is running.

HTTP and HTTPS ports are opened since we are going to install an apache server on our instance once it’s running.

In the source tab you can see that we have entered 0.0.0.0/0 to allow our instance to accept traffic from anywhere on the internet. This is the reason why we are seeing the warning on the screen.

For our personal case this won’t be an issue but for a company you will want the s

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

代码区博客精选文章
分页:12
转载请注明
本文标题:Launching an EC2 instance
本站链接:https://www.codesec.net/view/610712.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(98)