Amazon Elastic Compute Cloud(EC2): Introduction



By Jayant Sharma



Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, re-sizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. 


Benefits of Amazon EC2


ELASTIC WEB-SCALE COMPUTING

Amazon EC2 enables you to increase or decrease capacity within minutes, not hours or days. You can commission one, hundreds, or even thousands of server instances simultaneously. You can also use Amazon EC2 Auto Scaling to maintain availability of your EC2 fleet and automatically scale your fleet up and down depending on its needs in order to maximize performance and minimize cost. To scale multiple services, you can use AWS Auto Scaling.

COMPLETELY CONTROLLED

You have complete control of your instances including root access and the ability to interact with them as you would any machine. 

FLEXIBility

You have the choice of multiple instance types, operating systems, and software packages. Amazon EC2 allows you to select a configuration of memory, CPU, instance storage, and the boot partition size that is optimal for your choice of operating system and application. 

SECURE

Cloud security at AWS is the highest priority. As an AWS customer, you will benefit from a data center and network architecture built to meet the requirements of the most security-sensitive organizations. Amazon EC2 works in conjunction with Amazon VPC(Virtual Private Cloud) to provide security and robust networking functionality for your compute resources.

EASY TO START

There are several ways to get started with Amazon EC2. You can use the AWS Management Console, the AWS Command Line Tools (CLI), or AWS SDKs. AWS is free to get started.

Amazon EC2 Structure


Amazon EC2 Instances and types

An instance is a virtual server in the AWS cloud. With Amazon EC2, you can set up and configure the operating system and applications that run on your instance.
Amazon EC2 is here to deliver the wide selection of instance types which are probably optimized to fit various use cases. All the instance types have come up with various combinations like CPU, Storage, Memory and other networking capacities. For each and every instance, Amazon EC2 provides a predictable and consistent amount of CPU capacity without any need of underlying hardware.
The EC2 instance types are generally categorized into 5 types by the Amazon. They are:
  1. General Purpose:  (T2, M4, M3)
  2. Computer Optimized: (C5, C4, C3)
  3. Memory Optimized: (X1, R4, R3)
  4. Accelerated Computing: (P3, P2, G3, F1)
  5. Storage optimized: (I3)
  6. Dense-storage Instances: (D2)

1.General Purpose Instance

    • T2: T2 AWS instance is one of the best-performed instances which offers the baseline CPU performances with the effective capability. It has an ability to burst all the performances that are directed by the CPU credits. Generally, every T2 instances will get credits based on the established rate and the size of an instance which are accurately called as the CPU credits. These type of instances will be a great option especially for the workloads, which doesn't require more CPU consistent and well suitable for the small databases, web servers, and developer environments.
    • M4: These instances are described as one of the leading and best general purpose instances. It will offer a great network, memory balance by computing all the resources for several applications. They are also providing the increased networking facility which is 4 times equal to the packet rate along with guaranteed reliable latency with a high network. These instances are well devoted to the network capacity for input/output operations and EBS optimized.
      M4 instances types: Large, Xlarge, 2xlarge, 4xlarge, 10xlarge


  • M3: Basically, the M3 instance type is used to balance the network, memory and compute the resources according to it. All these resources are used for the general purpose of virtual machines and mostly to the EC2 instances. These types of instances are well suitable for the small and mid-sized databases for the data processing jobs, which may require the cluster computing and extra money.

2. Compute-optimized instances
  • C5: The instance of C5 is completely optimized for computing-intensive workloads and also delivers cost-effective high performance with low rates. The main use cases are with high-performance web servers, batch processing, scientific modeling, high-performance computing (HPC), distributed analytics, ad serving, highly scalable multiplayer gaming and videos encoding etc. 
  • C4: However, these types of instances are the addition to compute-optimized instances which are features with the max number of performance processors at the lowest amount of prices. These types of instances are well suitable for the compute-bound application types which mat derives all the advantages of high-performance processors. Mostly the C4 instance types are dependent on the custom processors that are optimized for EC2. The Intel boost technology will help the clock speed of C4 instances to touch.

3. Optimized Memory 

  • X1: In general, these types of instances are suited well for the large-scale, enterprise-class and in-memory application at affordable prices with each GiB RAM among all the AWS EC2 instance types. It is defined as one of the latest addition of EC2 instance group that is intended to perform the high scale executing and in-memory applications over the AWS cloud. When compared to the other AWS EC2 instances, this X1 instances will offer the lowest prices for each GiB of RAM and well suited to execute the in-memory databases and applications. All these instances are SAP certified in order to run the production environments perfectly.
  • R4: The instances of R4 is completely optimized with memory intensive applications and mostly delivers the best price for GiB of RAM than R3. 
  • R3: Generally, the R3 Instances are fully equipped in order to run a memory intensive application, which is less expensive when compared to the other instances. It will offer the greater performance with more bandwidth, supported latency, increased performance and great EBS optimization support. These types of instances are well suitable for in-memory analytics databases in order to acquire the maximum memory performances with the gained high price of units. They can also support the HVM machine images only.

4. Accelerated Computing 

  • P3: The respective instances of P3 are the latest generations of general purpose GPU instance. The use cases are completely Machine or Deep Learning, computational fluid dynamics, computational finance, speech recognition, drug discovery etc. 
  • P2: The P2 instance is completely intended for certain general purpose GPU computing applications. The use cases of P2 are High-Performance databases, computational finance, molecular modeling, genomics, rendering and other server-side GPU compute workloads etc. 
  • G3: The G3 instance is completely optimized for related graphics-intensive applications. The use cases of G3 are 3D visualizations, graphics-intensive remote workstation, application streaming and other server-side graphics workloads. 
  • F1: The F1 instance is completely offered with customizable hardware accelerations with certain field programmable gate arrays. The various use cases of F1 are Genomics research, financial analytics, big data search, security, and analysis as well. 

5. Storage Optimized 

  • I3- High I/o Instance: The family mostly includes High Storage Instances that provides Non-volatile Memory Express SSD backed instance storage optimization with low latency and high random I/o performance and provides high IOPS at low costs.

6. Dense-storage Instances:

  • D2: These storage optimized instances will offer up to 48TB by providing the huge disk by providing them at an affordable price for each disk type performance on AWS EC2 instances. The D2 instances are specifically designed for workloads which are greater sequential write and the get the read access for large data storage. All these are well-suited for data warehouses, processing computing and Hadoop. These instances are optimized by EBS which offers dedicated block storage for your AWS account that ranges from 750 Mbps to 4000 Mbps with free usage. It also allows the users to access them regularly by achieving the great network traffic.



Instance Life cycle

The following illustration represents the transitions between instance states.



        The instance lifecycle

pending                                              
The instance is preparing to enter the running state. An instance enters the pending state when it launches for the first time, or when it is restarted after being in the stopped state.
running           
The instance is running and ready for use.
stopping         
The instance is preparing to be stopped or stop-hibernated.
stopped               
The instance is shut down and cannot be used. The instance can be restarted at any time.
shutting-down
The instance is preparing to be terminated.
terminated     
The instance has been permanently deleted and cannot be restarted.

Amazon Elastic Block Store (Amazon EBS)

Amazon Elastic Block Store (Amazon EBS) is a block storage system used to store persistent data. It provides block level storage volumes for use with EC2 instances. EBS volumes are highly available and reliable storage volumes that can be attached to any running instance that is in the same Availability Zone. 
Amazon EBS is recommended when data must be quickly accessible and requires long-term persistence. EBS volumes are well-suited for use as the primary storage for file systems, databases, or for any applications that require fine granular updates and access to raw, unformatted, block-level storage.

Amazon EC2 Instance Configuration

  1. Open the Amazon EC2 console. 
  2. Choose Launch Instance.
  3. In Step 1: Choose an Amazon Machine Image (AMI), find an Amazon Linux AMI at the top of the list and choose Select.
  4. In Step 2: Choose an Instance Type, choose Next: Configure Instance Details.
  5. In Step 3: Configure Instance Details, choose Network, and then choose the entry for your default VPC. It should look something like v.
    1. Choose Subnet, and then choose a subnet in any Availability Zone.
    2. Choose Next: Add Storage.
  6. Choose Next: Tag Instance.
  7. Name your instance and choose Next: Configure Security Group.
  8. In Step 6: Configure Security Group, review the contents of this page, ensure that Assign a security group is set to Create a new security group, and verify that the inbound rule being created has the following default values.
    • Type: SSH
    • Protocol: TCP
    • Port Range: 22
    • Source: Anywhere 0.0.0.0/0Note
  9. Choose Review and Launch.
  10. Choose Launch.
  11. Select the check box for the key pair that you created, and then choose Launch Instances.
  12. Choose View Instances.
  13. Choose the name of the instance you just created from the list, and then choose Actions.
    1. From the menu that opens, choose Networking and then choose Change Security Groups.
  14. Select the check box next to the security group with the description default VPC security group.
  15. Choose Assign Security Groups
security group acts as a virtual firewall for your instance to control inbound and outbound traffic. When you launch an instance in a VPC, you can assign up to five security groups to the instance. Security groups act at the instance level, not the subnet level. Therefore, each instance in a subnet in your VPC could be assigned to a different set of security groups. If you don’t specify a particular group at launch time, the instance is automatically assigned to the default security group for the VPC.

For each security group, you add rules that control the inbound traffic to instances, and a separate set of rules that control the outbound traffic. This section describes the basic things you need to know about security groups for your VPC and their rules.

You might set up network ACLs with rules similar to your security groups in order to add an additional layer of security to your VPC. For more information about the differences between security groups and network ACLs.

Elastic IP's


In Elastic IP address is a static IPv4 address designed for dynamic cloud computing. An Elastic IP address is associated with your AWS account. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account.
It is a public IPv4 address, which is reachable from the internet. If your instance does not have a public IPv4 address, you can associate an Elastic IP address with your instance to enable communication with the internet; for example, to connect to your instance from your local computer.
The link for IPv6 Configuration is given LINK HERE
Why Elastic IP?
Elastic IP addresses are used by AWS to manage its dynamic cloud computing services. Within the AWS infrastructure, customers have virtual private clouds (VPC), within the VPCs, users have instances. So when you launch an EC2 instance, you receive a Public IP address by which that instance is reachable from internet. Once you stop that instance and restart the instance you get a new Public IP for the same instance. So it's basically a problem to connect your instance from internet for not having a static IP. To overcome this problem, Elastic IP is attached to an Instance which doesn't change after you stop / start the instance.

Comments

Popular posts from this blog

Amazon Simple Storage Service(S3)

AWS Identity and Access Management (IAM)

AWS CloudWatch: Introduction