Launching EC2 Instance

EC2 Instance

Elastic Compute Cloud (Amazon EC2) is one of the most well-known services or one of the most used services on Amazon. An EC2 instance is simply a virtual server used for running applications on cloud infrastructure. AWS can serve an unlimited set of EC2. It enables on-demand, scalability, and computing capacity in the AWS cloud.

It is a web Server offered by Amazon and also provides a scalability option to resizable compute service, you can scale up and scale down the total number of instance you are running

EC2 Instance type

There are different types of AWS instances with different configurations, and they are divided into five types these are

  • General purpose
  • Compute-optimized
  • Memory-optimized
  • Accelerated Computing
  • Storage optimized

1. General-purpose instances: A general-purpose instance is basically a balanced compute option i.e. a balance of compute, memory, and networking resources. It can be used for handling a wide range of workloads.

2. Compute optimized: Compute-optimized is useful for compute-bound applications that require a large amount of processing power. 

They are well suited for :

  • High-performance web servers
  •  high -performance computing 
  • Batch processing workloads 
  • Dedicated gaming servers.

3. Memory-optimized: A memory-optimized is used for delivering fast performance for workloads that process large datasets in memory. These are ideal for applications that require more memory and less CPU.

4. Accelerated Computing: Accelerated Computing are latest general-purpose instances that help you to provide accelerated performance when the CPU clock rate increases.

5. Storage optimized: Storage optimized is basically designed for workloads that require high read and write access to a very large set of data in local storage. They are optimized for delivering tens of thousands of I/O operations per second to applications.

Amazon EC2 instance Feature

Amazon EC2 provides a wide range of instance choices to match your workload’s needs. Many of the features in Amazon EC2 instances are customizable such as virtual processor, memory, storage, etc. Some features are mentioned below

  • OS support: EC2 instances support many OS like Linux, Windows, and many more. Amazon also provides its own OS to the users.
  • Security: AWS EC2 provide the user a security system to create a group of instance as per their requirement
  • Scalability: AWS provides an option to scale up and down your instance Also provides an option of auto-scaling the running instances.
  • Persistence storage: AWS provides a feature of block-level storage volume that you will attach to your EC2 instance and can be used as a hard drive for the service named Amazon Elastic Block Storage (EBS).
  • Elastic IP addresses: A static IP address designed for dynamic cloud computing. A static IP address is assigned with your EC2 instance or can be moved from instance to instance.
  • Pricing: Different pricing options are provided by AWS according to the type of application, resource, and database used. Pay-as-you-go pricing options are available

Getting started with Amazon EC2 

  • If you have an AWS account then log in to your account, if not then you have to create your AWS account to access the services of AWS. You can create your AWS account by using the link given below.

( https://portal.aws.amazon.com/)

  • In your AWS account on the top left search for EC2 and use the following procedure to create an EC2 Instance.
  • In the EC2 dashboard, you can see the status of the instances you made like the number of instances running, security groups attached to EC2, Volume attached, and many more
  • Below resources there is an option for Launch Instance click on Launch Instance.
  • After that you can write the name of your instance, just below that you have an option to choose Application and OS Image according to your need (Amazon Machine Image) just like I chose Ubuntu as shown below:
  • Just below that you have an option to choose the Instance type according to your need you can choose the Instance type.
  • You can choose a key pair to securely connect to your instance. Ensure that you have access to the selected key pair before you launch the instance.
  • You can use your existing key, or you can create your own key pair. Name your key pair so that you can find You can adjust your network security if you have your own VPC.
  • You must create Security groups to connect your EC2 to the outer network.
  • Allow SSH for access to your EC2 instance, Allow HTTPS and HTTP for internet traffic
  • Finally configure storage for your EC2 instance you can also add new volume to your EC2 by the help of Amazon Elastic Block Storage (EBS)
  • If you want to add additional settings to your EC2 like domain name, instance recovery, and many more than configure additional settings.
  • You can check your configuration summary from the right side and then click on launch instance.

Connect your EC2 instance From terminal

  • Go to instance and wait for some time until status check is initialized.
  • yourYou can also check details of your instance below. After that click on instance and in their top click on connect
  • Open terminal in your physical machine and Write ssh command for connect to your instance.

ssh -i “demo.pem” ubuntu@ec2-175-41-217-146.ap-northeast-1.compute.amazonaws.com

Here demo.pem is the key pair you made to access your instance Ubuntu- name of your machine and @172.31.0.8- IP address of your instance

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top