EC2:Art of Managing Virtual Servers in AWS

Deep Learning on Amazon EC2 GPU with Python and nolearn - PyImageSearch

  • EC2 stands for Elastic Compute Cloud.

  • EC2 is an on-demand computing service on the AWS cloud platform. Under computing, it includes all the services a computing device can offer to you along with the flexibility of a virtual environment.

  • It also allows the user to configure their instances as per their requirements i.e. allocate the RAM, ROM, and storage according to the need of the current task.

  • Even the user can dismantle the virtual device once its task is completed and it is no more required. For providing, all these scalable resources AWS charges some bill amount at the end of every month, the bill amount is entirely dependent on your usage.

  • Lightbox

    Use Cases of Amazon EC2 (Elastic Compute Cloud):

    1. Deploying Application: In the AWS EC2 instance, you can deploy your application like .jar,.war, or .ear application without maintaining the underlying infrastructure.

    2. Scaling Application: Once you deployed your web application in the EC2 instance know you can scale your application based upon the demand you are having by scaling the AWS EC2-Instance.

    3. Hybrid Cloud Environment: You can deploy your web application in EC2-Instance and you can connect to the database which is deployed in the on-premises servers.

    4. Cost-Effective: Amazon EC2-instance is cost-effective so you can deploy your gaming application in the Amazon EC2-Instances.

The AWS EC2 Instance Types are as follows:

  • General Purpose Instances

  • Compute Optimized Instances

  • Memory-Optimized Instances

  • Storage Optimized Instances

  • Accelerated Computing Instances

AWS EC2 Operating Systems:

  • Amazon Linux

  • Windows Server

  • Ubuntu Server

  • SUSE Linux

  • Red Hat Linux

  • Macos .......

Lightbox

Pricing of AWS EC2 Instance:

The pricing of AWS EC2-instance is mainly going to depend upon the type of instance you choose. The following are the pricing charges on some of the EC2-Instances.

  1. On-Demand Instances: The On-Demand instance is like a pay-as-you-go model where you have to pay only for the time you are going to use if the instance is stopped then the billing for that instance will be stopped when it was in the running state then you are going to be charged. The billing will be done based on the time EC2-Instance is running.

  2. Reserved Instances: Reversed Instance is like you are going to give the commitment to the AWS by buying the instance for one year or more than one year by the requirement to your organization. Because you are giving one year of Commitment to the AWS they will discount the price on that instance.

  3. Spot Instances: You have to bid the instances and who will win the bid they are going to get the instance for use but you can’t save the data which is used in this type of instance.

Get Started With Amazon EC2 Linux Instances:

First login into your AWS account. Once you are directed to the management console. From the left click on “Services” and from the listed options click on EC2.

Lightbox

EC2 console:

Steps:

  1. Choose Launch Instance.

  2. Choose an Amazon Machine Image (AMI), find an Amazon Linux 2/Ubuntu/Redhat AMI at the top of the list and choose Select.

  3. Choose an Instance Type, choose Next: Configure Instance Details.

  4. Configure Instance Details, provide the following information:

    • Leave Number of instances at one.

    • Leave Purchasing option at the default setting.

    • For Network, choose the entry for the same VPC

    • For Subnet, choose a default subnet in any Availability Zone.

    • For File systems, make sure that the EFS file system that you created in Step 1: Create your Amazon EFS file system is selected. The path shown next to the file system ID is the mount point that the EC2 instance will use, which you can change.

    • The User data automatically includes the commands for mounting your Amazon EFS file system.

  1. Choose Next: Add Storage.

  2. Choose Next: Add Tags.

  3. Name your instance and choose Next: Configure Security Group.

  4. Choose Review and Launch.

  5. Choose Launch.

Connect EC2 Instances:

Select instance > connect.