DEV Community

Cover image for What is Amazon AWS EC2 and where can you use them?
Bruno
Bruno

Posted on

What is Amazon AWS EC2 and where can you use them?

As you embark on your AWS journey, you've likely encountered references to EC2 (Elastic Compute Cloud) along the way. In this article, I aim to demystify EC2 by guiding you through its core concepts, origins, operational mechanics, and diverse application areas. So, let's delve into the captivating realm of EC2 together, unraveling its immense potential and discovering the myriad opportunities it presents!🏰

🤔 What exactly is "EC2"?

What is it? Who invented it? Well, you surely know it was developed by Amazon, I know... But... what is it? Well, EC2 stands for "Elastic Compute Cloud".

spongebob character patrick elastic

Now, what is exactly "Elastic Compute Cloud" and what does it mean for the cloud to be "elastic compute"? It means that the computing resources provided can be easily scaled up and down based on demand. Why is this useful? EC2 allows you to "rent" virtual machines in the cloud. With this, you are able to run applications which require a lot of computing power, and saving money in hardware and physical data centres.

large sets of data the simpsons cartoon scientist

Suppose you are working with heavy sets of data, you can use an EC2 instance to work with it without having the need to buy ultra expensive hardware, for example.

Besides, EC2 instances are highly reliable, which means they make a great choice when deploying and storing apps and data in the cloud.

🧰 What kind of tools does EC2 provide?

With EC2, you get access to a handful of tools and types of instances, each to suit your needs. EC2 instances differ in terms of CPU, memory, storage, and networking capacity. Some examples of EC2 instances include:

  • General Purpose
  • Compute Optimised
  • Memory Optimised
  • Storage Optimised
  • GPU Instances
  • Bare Metal Instances

For instance, if you need a general-purpose instance, you can choose the General Purpose type. If you need an instance that is optimised for compute-intensive workloads, you can choose the Compute Optimised type. If you need an instance with high memory capacity, you can choose the Memory Optimised type. If you need an instance that is optimised for storage-intensive workloads, you can choose the Storage Optimised type. If you need an instance that is optimised for graphics-intensive workloads, you can choose the GPU Instances type. And if you need direct access to the underlying hardware, you can choose the Bare Metal Instances type.

🏎️ On-Demand EC2

AWS EC2 on-demand instances are charged by hour, immediately available and are ideal for short-term workloads or when you need to scale up quickly. They are used for a variety of workloads, including development and testing, web apps and small to medium-size databases. One other advantage with On-Demand instances is that you don't need to make any upfront commitments or reservations, and you can easily scale up or down your compute capacity as your needs change.

🙆‍♀️ Amazon EC2 Auto-Scaling

Auto Scaling is a key feature of Amazon Elastic Compute Cloud (EC2) that allows you to automatically adjust your computing resources based on the needs of your applications.

With Auto Scaling, you can increase or decrease the number of EC2 instances in your group based on several factors such as CPU utilisation, network traffic, or custom metrics.

giraffe growing out of a flower pot

Auto Scaling helps you maintain the availability of your applications and services by automatically replacing failed instances and distributing incoming traffic across healthy instances. It also helps you optimize the cost of your infrastructure by automatically scaling down your resources when they are not needed.

You can configure Auto Scaling to launch new instances based on predefined rules or in response to events such as traffic spikes or application failures. You can also integrate Auto Scaling with other AWS services such as Elastic Load Balancing (ELB) and Amazon CloudWatch to create a highly available and scalable architecture.

With all of the above aspects of EC2 instance auto-scaling, you play on the safe side when it comes to saving costs and keeping your users happy 😃

🧾 PAYG - Pay-as-you-go

What does it mean to be a "pay-as-you-go" service? Well, elastic compute clouds typically operate on a pay-as-you-go pricing model.

aws ec2 pay-as-you-go model

With EC2, you only pay for the compute resources you consume and the duration for which you use them. This flexibility eliminates the need for upfront hardware investments and allows you to align costs with actual usage. By scaling resources up or down as needed, you can optimise spending and maintain cost-effectiveness. This is one of the great benefits of this payment model.

Thank you for reading!👋

After having gone through all of these bits and bytes of AWS EC2 instances, you should now be able to get started in learning more about it by setting up one and exploring the services and tools it provides. Congratulations 🙌 and I hope it was helpful for you!🙂

I'd like to thank you for reading my article and invite you to follow me on Dev.to, as well as my other platforms:

GitHub: https://github.com/bcostaaa01
Twitter: https://twitter.com/bruno2001costa
Enter fullscreen mode Exit fullscreen mode

I look forward to seeing you on my next one!

Until then,
Happy Coding!👩‍💻

Top comments (0)