COMPUTE SERVICES in AWS

COMPUTE SERVICES in AWS

Compute is the one of the main service offered by AWS. Compute is a type of Infrastructure as a Service(IaaS) because it provides the necessary infrastructure to execute our task such as virtual machine with memory. Compute service is on-demand service. Pay for what we use. Compute can also be combined with the other services like storage, networking based on the requirement. There are 3 different types of compute services/resources.

No alt text provided for this image

Virtual Machine

Virtual machine is a virtual environment that works like a computer within a computer. It is commonly known as VM. VM is same like system it has CPU, memory, disk for storage purpose and also has network to connect to the internet.

Say suppose we have a system with windows operating system and we want to have linux operating system also in the same system; this can be achieved by the virtualization technique as explained below.

No alt text provided for this image

Fig 1: Virtualization Technique

The physical system like desktop, laptops will represent the hardware. There will be software used called as hypervisor which is known as virtual machine manager. One example for hypervisor is oracle VM virtual box. The hypervisor will create a software based or virtual version of a computer with desired amount of CPU, memory and storage. Virtual machine always borrows CPU, memory and disk from the physical host machine. It means the part of the physical system will work as a standalone computer.

VM can also acts as an actual system but it has a different operating system compared to the physical system. Despite using the same hardware the VM is completely isolated from the rest of the system. The software inside the VM cannot interact with the host computer or the other VMs on the same physical system. The VMs can run like individual computers with separate operating system. They are completely independent from other VMs and physical system.

Benefits of VM

·????????Portable

·????????Cost savings

·????????Agility and speed

·????????Lowered downtime

·????????Scalability

?

EC2 – Elastic Compute Cloud

EC2 stands for Elastic Compute Cloud. It is used for launching virtual machines/instances on cloud. It is a scalable service that means the size of instance can be changed at any time according to the requirement. Using EC2 we can launch different types of VMs such as windows based, Linux based, mac based etc. EC2 provides the infrastructure in almost all regions and availability zones according to the requirement.

Component of Amazon EC2

The necessary arrangements to explain about EC2 are as follows. Consider the figure

No alt text provided for this image

Figure: EC2 components

·????????Instances – Instance is an EC2 virtual machine.

·????????AMI – AMI stands for Amazon Machine Image. It is a template contains an operating system and additional software needed to launch AWS EC2 instances.

·????????Key Pair – Key pair is a set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance. Key pair consists of private key and public key both. To login private key will be used, public key will be copied to the instance by AWS at the time of launching.

·????????Security Group – Security group can lets us control who can access EC2 instance. Security group acts as a virtual firewall for our EC2 instances to control inbound and outbound traffic.

·????????Tags – Tag is a label of our AWS resource. Tag can be assigned by AWS or the user. Each tag consists of key and value. We can use the tags to organize the resources in our account. Tags can be used to identify the servers. Each tag key must be unique for each resource and each tag key can have only one value.

·????????VPC & Subnets: VPC is a networking component of AWS. Subnets are the subnetworks. Using the subnet ip address we can connect to the internet.

?

EC2 Instance Naming Convention

To read the names of EC2 instance AWS has naming conventions for instance.

Example: M6g.2xLarge

The above example is the instance name which includes the characters and numbers. The entire text in the example represents the instance type. Instance type is made of 4 components namely instance family, instance generation, additional capability and instance size.

The first character represents the instance family. Here in this example M represents general purpose computing instance type. 6 represent 6th generation. The next letter g represents additional capability of the EC2 instance (Graviton2). 2xLarge represents the instance size that is the amount of CPU, memory, storage and network performance of EC2 instance. This 2xLarge has twice the no of CPU, Memory and storage resources as compared to the base size that is xLarge.

?

Instance Type

Instance type is the combination of CPU, memory, storage and the networking capacity. Generally instance type will be chosen based on the requirements of the application. For example some applications need more memory, some needs storage space etc.

No alt text provided for this image


Figure: Different instance types

AWS divides the instance type into 5 different categories

·????????General Purpose: This is the most basic instance type which generally provides the balanced compute, memory and networking resource. This type of instance is suitable for web servers, caching fleets and distributed data store applications. These are also suitable for development, test and demo environment applications.

·????????Compute-optimized: This instance is ideal for compute bound applications that benefit from high performance processors. Instance type which has more CPU power comes under this category hence this is best suited for higher compute power. It is well suited for batch processing, high performance web servers and HPC, scientific modeling, dedicated gaming servers, machine learning inference

·????????Memory-optimized: These are designed to deliver fast performance for workloads that require huge memory to process large data sets. Memory optimized instances are used in applications such as open-source databases, in-memory caches and real-time big data analysis.

·????????Storage-optimized: For workloads that demand frequent, sequential read and write access to large datasets on local storage, storage-optimized instances are created. It is designed to provide applications with tens of thousands of random, low-latency I/O operations each second. This instance type will work towards the network side of EC2 instance. The application has medium size data sets that need high compute performance and high network throughput. These include relational databases including MySQL, MariaDB, PostgreSQL and NoSQL databases including KeyDB, ScyllaDB and Cassandra.

·????????Accelerated Computing: When compared to software operating on CPUs, accelerated computing instances use hardware accelerators, or co-processors, to do some tasks more effectively. These tasks include data pattern matching, graphics processing, and floating point number calculations.

?

SSH EC2 Instance, Install Httpd

SSH is a way to control the remote machine using the command line. By using SSH we can log into EC2 instance and perform any kind of operations as we do on our personal computers. To SSH to our EC2 instance the port 22 and port 80 should be allowed for ssh and http protocols. SSH EC2 instance connect can be done by the following steps

1.?????To connect to the EC2 instance we need to click on connect button. After that it will be redirected to 3 options namely EC2 instance connect, session manager and SSH client. To SSH we need to select SSH client

2.?????We have to open the terminal and change the permission of private key file that is pem file with the command

chmod 400 file.pem

3.?????Then go back to console and copy the command to connect to the EC2 instance like below(for different users and login it will be different)

Example: ssh -i "aws9pm.pem" ec2-user@ec2-44-212-36-129.compute-1.amazonaws.com

4.?????Then confirmation should be given with yes

5.?????Need to update the packages with the command

sudo yum update

6.?????We can install httpd with the command

sudo yum install httpd -y

7.?????To start httpd service we can run the command

sudo systemctl start httpd

8.?????To check the status of the httpd service

sudo systemctl status httpd

No alt text provided for this image

9.?????The above command shows the status of httpd service as active/inactive based on the situation

10.?We can access the EC2 instance using public ip address or public DNS

11.?Then the home page of httpd will open

?

Elastic Beanstalk(EB)

Elastic Beanstalk is also called as EB. EB is an easy to use service for deploying and scaling web applications. To use an EB we have to create an application, upload version in the form of application bundle. EB automatically launches an environment an creates and configures aws resources needed to run the code. After the environment is launched we can then manage our environmemnt and deploy new application versions. After create and deploy the application the information about application like including metrics, events and environment status is available through the EB console, APIs or CLI including the unified AWS CLIs. As A developer we can deploy application without provisioning the underlying infrastructure.

???????????Features:

·????????Wide selection of application platforms

·????????Variety of application deployment options

·????????Monitoring

·????????Scaling

·????????Customization

·????????Compliance

Serverless Computing

In serverless the infrastructure used to run applications no longer need to be provisioned or maintained. Servers will be present in serverless architectures also. Hence serverless means we cannot bother about managing the infrastructure. But the server provisioning and maintenance are entirely taken care by the provider. Server can scale automatically and charge according to the usage. Serverless computing has become very popular with many modern applications.

???????????Benefits of serverless:

·????????No servers management(hardware is not necessary, even the instances)

·????????No management of OS

·????????Everything including capacity matching and patching will be done automatically

·????????Developers are only charged for the space they use on the server which reduces the cost

·????????Serverless architectures are inherently scalable

?

AWS Lambda

It is a serverless service. AWS lambda allows us to write the functions to run the code on demand. These functions are triggered by the events inside or outside aws account. They do not have to keep running. AWS lambda functions are only meant for short executions.

???????????Features:

·????????Automatic scaling

·????????Pay per user price

·????????Lambda functions can get resources to up to 10GBs of RAM

·????????Integrate with many services like S3, DynamoDB, API-Gateway, SNS

Thank you

赞
回复

要查看或添加评论,请登录

LAXMI JAYANNAVAR的更多文章

  • AWS Billing & Pricing

    AWS Billing & Pricing

    In this article we will be learning the different pricing principles in AWS, understand the AWS organization and its…

    2 条评论
  • AWS Monitoring

    AWS Monitoring

    AWS Trusted Advisor The AWS Trusted Advisor service examines all the resources in our AWS account and makes…

    2 条评论
  • AWS Security

    AWS Security

    Shared Responsibility Model: Every layer and step of any IT resource, including its networks, facilities, and…

    4 条评论
  • Databases in AWS

    Databases in AWS

    Data Individual facts, statistics, or pieces of information are known as data, and they are frequently numerical and…

    3 条评论
  • VPC and Components

    VPC and Components

    VPC Overview: · Virtual Private Cloud, sometimes known as VPC, is a networking component of cloud computing. It is an…

    4 条评论
  • AWS Storage Gateway

    AWS Storage Gateway

    AWS Storage Gateway Before going to learn about AWS storage gateway let’s consider a scenario, Assume our application…

    2 条评论
  • Advanced services: Content delivery and Storage

    Advanced services: Content delivery and Storage

    In this article people can have a look at the other AWS services like snow family and cloudfront. CloudFront Let’s…

    2 条评论
  • Elastic Load Balancer with Auto Scaling Group

    Elastic Load Balancer with Auto Scaling Group

    Introduction: This article explains about the concept of load balancer types and the working of load balancer with auto…

    2 条评论
  • Auto Scaling

    Auto Scaling

    Auto Scaling In this article reader can understand what auto scaling group is, different policies for the working of…

  • Types of Storage Services in AWS

    Types of Storage Services in AWS

    Types of Storage Services in AWS Introduction: In this article I will be explaining about the different storage…

社区洞察

其他会员也浏览了