DEV Community

Cover image for Amazon EC2 (Elastic Compute Cloud) For A Complete Beginner
Cloud For Geeks
Cloud For Geeks

Posted on

Amazon EC2 (Elastic Compute Cloud) For A Complete Beginner

Amazon EC2 is a service that allows you businesses to run their application in AWS cloud. You can easily set up a virtual machine and perform all your computation on it. In this post, we will teach you the basics of Amazon EC2.

Introduction

  • EC2 is one of the oldest and fundamental services of AWS. Though everything today is serverless, you still need to know EC2.
  • EC2 allows you to do the following things :
    • Rent virtual machines (EC2 itself)
    • Storing data on virtual drives (EBS)
    • Distributing load across the machines (ELB)
    • Scaling the services using an auto-scaling group (ASG)

Amazon Machine Image โ€“ AMI

  • AMIs are the templates from which virtual servers (EC2 instance) get created.
  • In simple terms, AMIs are the collection of the operating system, architecture (32-bit or 64-bit) with the softwares that will be running on that operating system.
  • For example :
    • Amazon Linux AMI is the one that comes with a Linux operating system and many packages of the Linux that one might need.
    • Windows AMI comes with Windows as its operating system and software one might need.
  • By choosing AMI you basically decide the software part of your EC2 machine.
  • You can use a single AMI and launch multiple instances from it.

Instance Type

  • As we have seen AMI defines the software part of your EC2, Instance type defines the hardware part of your EC2 machine.
  • It is when you choose instance type you define the hardware configuration of your EC2 machines. Hardware configurations involve Memory, vCPUs, instance storage, network performance parameters.
  • This instance types are categorized on the basis of what kind of requirement you have with your EC2 machines.

Features

  • Instance: It provides you a virtual environment (instances) for your computing tasks.
  • AMIs : It comes with set of many preconfigured templates for your instances known as Amazon Machine Images, that saves you the efforts of manually installing operating system and additional softwares and configuring them.
  • Instance Type : You get a wide range of configurations of CPU, memory, storage and networking capacity for your instances, known as instance types. This allows you to select any power of computation as per your requirement.
  • Key Pairs : EC2 comes with secure login also. It provides login through key pairs where AWS stores the public key and you store the private key.
  • Instance Store Volume : By default it provides you storage volume to store your temporary data (data that gets deleted when you stop your instance) known as instance store volume.
  • Amazon EBS volume : If you want to store your data even after your instance get stopped, EC2 provides you persistent storage volume for your instance known as Amazon EBS volume.
  • Regions and Availability Zones : To make sure you wonโ€™t loose your data, it provides you multiple physical location for your resources,such as instances and Amazon EBS volume, known as Regions and Availability Zones.
  • Security Group : To prevent any unauthorized access, EC2 comes with security group. This creates a firewall that enables you to specify the protocols, ports and source IP ranges that can access your instances. Only the devices that follow this rules of your firewall can access your instances.
  • Elastic IP Address : You also get static IPv4 address for dynamic cloud computing known as Elastic IP address.
  • Tags: You can keep track of all the EC2 instances in your organization by using tags, it gives you the metadata by creating and assigning the tags to instances.
  • VPC : You can create your EC2 instance in a virtual networks that are logically isolated from the AWS cloud.

Conclusion

EC2 is the one service that changed the computing world. It is the most important service of AWS and very important if you are planning to get certified for AWS. This was just an overview of AWS EC2, I hope you guys like it. Let me know in the comments if you have any question, Iโ€™ll be posting more in detailed tutorials on AWS EC2.

Top comments (0)