Home / Blog / What is Amazon EC2? | Amazon Elastic Compute Cloud

What is Amazon EC2? | Amazon Elastic Compute Cloud

Machine-generated data is growing exponentially and getting insights from it is important for the business. EC2 is a web service that aims to make life easier for developers by providing secure and resizable computing capacity in the cloud. AWS Elastic search service EC2 has emerged as a popular open-source choice to harness this valuable data but deploying managing and scaling elastic search can be challenging. 

Amazon Elastic Search Service

AWS Elastic search service EC2 is a fully managed service that makes it easy for users to deploy secure and manage elastic search clusters that petabyte scale. It is based on the Apache Leucin library.  

It is a fully managed service that takes care of hardware provisioning software installation, patching failure recovery backups, and monitoring.  

What is an Amazon Machine Image (AMI)?

It is an image of a server including an operating system and often additional software which runs on AWS. Preconfigured templates for the creation of virtual servers (EC2 instances) in the AWS environment. Users can select an AMI provided by AWS, the user community, or through the AWS Marketplace.  

aws and ec2

Steps to use EC2

Choosing an AMI

The AMI would contain Software information, Operating System information, Volume information, and Access permissions. 

AMIs are of two types:

  • Predefined AMIs
  • Custom AMIs

Predefined AMIs: These are created by Amazon and can be modified by the user.

Custom AMIs: It is created by the user so, that they can be reused.

Choosing an Instance Type: An instance type specifies the hardware specifications that are required in the machine from the previous step. These instances are divided into 5 main families. They are

  1. Computed Optimized: For situations that require a lot of processing power.
  2. Memory Optimized: For setting up something to do with in-memory cache.
  3. GPU Optimized: For setting up a gaming system or a large graphical requirement.
  4. Storage Optimized: An instance type specifies the hardware specifications that are required in the machine from the previous step.
  5. General Purpose: When everything is equally balanced. 

Configure Instance

Instance types are fixed and their configurations cannot be altered. Users have to specify the number of instances, purchasing options, the kind of network the subnet when to assign a public IP, the IAM role, the shutdown behavior, and so on. 

Stopping the system and the termination system under ‘Shutdown behavior’ are completely different things!

Stopping = Temporarily shutting down the system.

Terminating = Returning control to Amazon.

Under the advance details the users can add bootstrap scripts that are executed when the virtual machine starts up. These instances are reserved for one year or three years. The entire amount has to be paid upfront or over a few months. Bidding can be done for these instances with the highest bidder winning access. These instances are available at a lesser cost than on-demand instances. 

Adding Storage

We then have to add storage. The user will be tasked with deciding the type of storage, which could be: 

  1. Ephemeral Storage (Temporary and free)
  2. Amazon Elastic Block Storage (Permanent and paid)
  3. Amazon S3

Free users get to access up to 30 GB of SSD or Magnetic storage (which can be found under Volume Type).

Adding Tags

Then we add tags. Tags are very helpful in identifying a machine in an environment where we have 700 or 1000 VMS running.

Configuring Security Groups

We need to configure security groups. Security groups are the actual firewall that sits in front of the EC2 instance and it protects that EC2 instance from unintended inbound and outbound traffic; where users can fine-tune the access to their EC2 instance based on port numbers and IP address for which it can be accessed.

installation of aws and ec2

When we’re about to launch or before the Amazon console launches the EC2 instance. It is going to give the option to create a key pair. The key pair is two things one is public and the second is private. The private key is downloaded by the user and is kept with the user and the public key is used by Amazon to confirm the identity of the user. The user just needs to download the private key to keep it for themselves. The private key gets downloaded as a .pem file.          

Author: TCF Editorial
Copyright The Cloudflare.
Â