Caltech Bootcamp / Blog / /

What is AWS EC2? A Comprehensive Guide

What is Amazon S3

Amazon Web Services (or AWS) is the most-used cloud provider in the world today. AWS EC2 is one of the most fundamental and often-used AWS services. What is AWS EC2, anyway? You’ve come to the right place for answers!

This article explains what Amazon EC2 is and explores AWS EC2 instances, why it’s so essential, its pros and cons and use cases. We’ll also share how professionals can master Amazon EC2 through an online cloud computing bootcamp.

Let’s get started. What is AWS EC2?

What is AWS EC2?

For starters, EC2’s full name is Amazon Elastic Compute Cloud. EC2 is a machine with an operating system and hardware components of the customer’s choice, except it is totally virtualized. Additionally, users can run multiple virtual computers within a single physical hardware.

AWS Elastic Compute Cloud (EC2) is one of the most vital parts of the AWS ecosystem, enabling scalable, on-demand computing capacity within the AWS cloud.

In practical terms, EC2 makes life simpler for developers by giving them secure and resizable cloud computing capacity. AWS EC2 greatly eases the scaling process (up or down), can be integrated into other Amazon services like AWS ECS, and offers customers a plan where they pay only for what they use.

So now that we know what AWS EC2 is, why is it important?

Why is AWS EC2 So Important?

Amazon’s EC2’s importance stems from its primary features:

  • It’s easily scalable.
  • It doesn’t require hardware.
  • It’s highly secure.
  • Pay only for what you use.
  • The customer is in complete control.
  • Customers can access their assets from anywhere in the world.
  • It can be used to launch and manage virtual private servers (VPS), making it the perfect platform for hosting websites and applications.

Now, let’s look at instances. What is an EC2 instance?

AWS EC2 Instance Types

AWS EC2 has two different categories of instances:

  • Physical. Amazon allocates a server to the customer. It exists in the real world and can be used to host applications.
  • Virtual. Virtual instances are simulations of real servers. They are run on top of physical instances and are often used to develop or test applications.

Now let’s look at a sample of instance types:

  • General purpose. These instances are virtual machines intended to hold a diverse range of tasks. They have been designed to provide CPU cores in large quantities in addition to on-demand memory and storage. They are commonly used for covering hosting web servers and testing and developing applications and software. These instances can also be used for other functions that don’t require high-powered CPU cores.
  • Compute-optimized. These instances typically power large-scale data apps that demand vast memory and processing power. These instances are created and advanced for running data-intensive, high-performance and computational applications that require extensive availability, fast network speed and high output/input operations per second. These applications encompass simulation computer-aided learning, financial and scientific modeling, business intelligence and enterprise-level data warehouses.
  • Memory-optimized. This memory-optimized instance uses solid-state drives with high speeds to access data extremely fast. It is perfect for apps requiring more memory than power, like open database sources and real-time big data analytics.
  • Micro instances. These instances are designed to be used on applications with limited throughput. Additionally, micro instances could function as an application platform for testing software, a smaller database server or a server that doesn’t need high transaction rates.
  • GPU optimized. These instances offer a way to run graphic-intensive programs faster than traditional EC2 servers. Systems using graphic processing units (GPU) include designing and gaming work.
  • Spot instances. Spot instances allow users to request (and pay for) extra EC2 capacity. If there are unused EC2 instances within the environment, spot instances are given to the user at a lower cost. Spot instances can be used for flexible applications that can work through intermittent interruptions like containerized workloads, batch processing, high-performance computing (HPC) and test and development processes.
  • Storage optimized. These instances optimized are perfect for apps that require the highest I/O performance, such as NoSQL databases storing and retrieving real-time data. They’re also ideally suited for intensive applications that need memory, like log processing or processing data for data warehouse analytics. Additionally, these instances offer high sequential read-and-write performance suitable for large data stores and high-traffic websites.

Now that we’ve covered AWS EC2 types, let’s look at some instance features.

AWS EC2 Instances Features

Here is a small sample of popular Amazon EC2 features:

  • Amazon CloudWatch. This feature lets users conduct surveillance of applications deployed on AWS and its cloud services. CloudWatch stores, collects and analyzes real-time and historical performance data. Amazon CloudWatch can also increase resource use, monitor applications, optimize spending, improve efficiency and increase or decrease capacity according to the needs of changing workloads.
  • OS. EC2 is compatible with many operating systems, including Microsoft, Linux, Debian and CentOS. You can assemble a virtual machine with any operating system you want with the help of AMI.
  • Automated scaling. The auto-scaling feature automatically increases or decreases capacities from Amazon virtual instances based on demand. Automatic scaling provides additional capacity for handling temporary traffic volume increases during launches or for increasing and decreasing capacity depending on threshold levels.
  • Elastic IP addresses. This feature is perfect for fail-over clusters and load balancers because it can be linked to instances and moved from one instance to another without a network administrator.
  • Persistent storage. The Elastic Block Storage (EBS) service links storage blocks to EC2 servers and is used as a hard drive. With EBS, users can increase or shrink their available storage for an EC2 instance, connecting EBS volumes to multiple instances simultaneously.
  • Pause and restart. EC2 instances can be stopped and then restarted later from a previous state. For instance, if an app eats excessive resources, it may be discontinued without charging additional usage.

A Use Case for AWS EC2

Let’s say your user base enjoys your product. How would you inform them about other offerings? Thanks to Amazon’s Simple Notification Service (SNS), EC2 and Simple Storage Service (S3), you can easily do what you need, like notify users whenever you create a newsletter.

Let’s see how. Just follow these steps:

 #1. Create an AWS account.

 #2. Set up an EC2 instance. If, at some point, you want to create an application using your S3 resources, you must create an instance of EC2.

  • Choose an AMI (Amazon Machine Image). An AMI is a template used to create a new instance (or a virtual machine) based on user requirements. The AMI contains information about the operating system, software, volume and access permissions. There are two kinds of AMIs:
  • Predefined AMIs. Amazon makes these, and you can modify them.
  • Custom AMIs. The user also makes these and can reuse them. They are also available through the AMI Marketplace.

 #3. Choose an instance type. Instance types specify the hardware specifications required in the machine from the previous step. Note that instance types are fixed, and their configurations cannot be changed. Instance types belong to five primary families:

  • Compute-optimized. For situations needing a lot of processing power.
  • Memory-optimized. For setting up actions to do with your in-memory cache.
  • GPU optimized. For setting up gaming systems or anything that needs a large graphic.
  • Storage optimized. When you must set up a storage server.
  • General-purpose. When all is equally balanced.

 #4. Configure Instance. You must specify the number of instances, purchasing options, network type and the subnet, then set the IAM role, assign a public IP, the shutdown behavior, etc. On a related note, stopping and terminating the system under “shutdown behavior” are entirely different.

“Stopping” temporarily shuts down the system.

“Terminating” returns control to Amazon.

Under the advanced details, users can add bootstrap scripts that execute when the virtual machine starts. It also offers multiple payment options, like:

  • On-demand instances. These can be launched whenever you require standard rates.
  • Reserved instances. These instances are reserved for either one or three years. The entire amount must be paid upfront or over a few months.
  • Spot instances. Bidding goes to the highest bidder. These instances cost less than on-demand instances.

 #5. Adding Storage. You must decide the type of storage, which could be:

  • Ephemeral Storage (temporary and free).
  • Amazon Elastic Block Store (permanent and paid).
  • Amazon S3.

Specify the size (in GBs), volume type, where the disk is mounted, and if the volume needs to be encrypted. Free users can access up to 30 GB of SSD or magnetic storage (found under ‘Volume Type’).

 #6. Adding tags. This helps to identify instances quickly.

#7. Configuring security groups. Security groups specify rules based on which users can access the EC2 instance. You set up security type, protocol, port range, and incoming traffic source. Incoming traffic must be explicitly specified while outgoing traffic is open.

 #8. Review. Click on ‘Launch.’ This creates the instance, and a dialog box will show up.

 a.) Private Key. The user downloads a private key.

 b.) Public Key. AWS uses a public key to confirm the user’s identity.

Once you create a new pair, the new private key gets downloaded as a .pem file. Next, we must use the following tools: PuTTY and PuTTYgen. PuTTY is typically used to connect a Windows system with a Linux system, which we do in this example. PuTTY doesn’t accept .pem files.

So, you create a new .ppk file using the PuTTY Key Generator:

  • Conversion> Insert Key.
  • Load the .pem file.
  • Select “Save Private Key” and find a location to save the key.
  • Next, select “Save Private Key” and find a location to save the key.
  • Provide your IP address and click “Auth” in the PuTTY configuration tool.
  • Finally, click on browse and find the corresponding .ppk file.

#9. Create an SNS and a topic.

#10. Make sure the topic is set to “public.”

#11. Add subscribers. These are the people who opted in to be notified about the newsletter.

#12. Create an S3 bucket.

#13. Set up an event relating to the bucket with SNS. A notification is sent to the subscribers whenever something is added to the bucket.

#14. Sync the S3 bucket and AWS instance.

And voila, your users will be notified!

The Challenges of AWS E2

We already have seen the benefits that AWS EC2 brings, but what about the challenges that come with it?

  • Deploying at scale. Running many instances can cause cluttered environments that are hard to manage.
  • Management of AMI lifecycle. Developers often start by using the default Amazon Machine Images. However, as computing needs evolve, custom configurations will likely be required.
  • Ongoing maintenance. Amazon EC2 instances are virtual machines that operate in the cloud. However, instances ultimately run on physical hardware, which can fail. AWS alerts developers when instances must be moved because of hardware maintenance. Unfortunately, this requires ongoing monitoring.
  • Resource utilization. Developers must manage the number of instances to avoid massive, expensive, long-running instances.
  • Security. Developers ensure that public-facing instances are running securely.

Do You Want to Learn More About Cloud Computing?

You can improve your cloud computing skills with this comprehensive online cloud computing program. This bootcamp will boost your cloud computing skills, making finding a secure and well-paying position in the field easier. In fact, Glassdoor.com shows that cloud computing professionals can earn an annual average salary of $94,404.

Check out the course today, and sharpen your cloud computing skills to face today’s challenges.

FAQ

Q: What is AWS EC2 used for?
A: AWS EC2 makes web-scale cloud computing more straightforward and convenient for developers.

Q: Is EC2 just a VM?
A: EC2 is a form of virtual machine.

Q: What type of server is EC2?
A: EC2 is a virtual server.

Q: Does EC2 have an IP address?
A: Once an EC2 instance gets launched, it’s given a private IP address at boot time.

Q: Is AWS EC2 public or private?
A: You can configure your EC2 to grant access as you see fit.

Cloud Computing Bootcamp

Leave a Comment

Your email address will not be published.

Cloud Computing Security

What is Cloud Computing Security?

Explore the fundamentals of cloud computing security in our beginner-friendly guide. Learn basic concepts important to kickstart a cloud computing career.

iaas

All About IaaS: A Comprehensive Guide

IaaS is what’s under the hood of all cloud applications and services. Learn more about what IaaS is, including its pros and cons, pricing, choosing the best provider, and more.

Cloud Computing Bootcamp

Duration

6 months

Learning Format

Online Bootcamp

Program Benefits