DEV Community

Cover image for EC2 Essentials: Your Gateway to Cloud Computing
Lindiwe
Lindiwe

Posted on

EC2 Essentials: Your Gateway to Cloud Computing

Knowing how to use Elastic Compute Cloud (EC2) is fundamental to understanding how the cloud works. This article will introduce you to the essentials of EC2, highlighting its key features and advantages, so you can confidently leverage its capabilities to enhance your applications and infrastructure.

Buckle up and learn

So what is Amazon EC2? Well, EC2 is the most popular AWS offering definitely used everywhere. It is the way to do Infrastructure as a Service on AWS.EC2 is not just one service, it is composed of many things at a high level.
It mainly consists of the following capabilities:

  1. You can rent virtual machines -> EC2 instances.

  2. Storing data on virtual drives (EBS volumes)

  3. Distributing load/traffic across machines(Elastic Load
    Balancers)

  4. Scaling the services using an EC2 auto-scaling group(ASG)

The cloud is to be able to rent these compute whenever you need, on-demand and EC2 is just that. Here are the EC2 sizing and configuration options we can choose for the virtual servers we rent from AWS:

• Choose any of these Operating Systems (OS): Linux, Windows
or Mac OS
• How much compute power & cores (CPU)
• How much random-access memory (RAM)
• How much storage space:
i. Network-attached (EBS & EFS)
ii. Hardware (EC2 Instance Store)

• Type of network you want to attach to your EC2 instance
-Network card: speed of the card, Public IP address

• Handle firewall rules with security groups
• Bootstrap script (to configure the instance at first
launch)~EC2 User Data

EC2 User Data

  • It is possible to bootstrap our instances using an EC2 User Data script.
  • Bootstrapping means launching commands when a machine starts.
  • That script is only run once at the instance's first start.
  • EC2 user data is used to automate boot tasks such as:
    1. Installing updates
    2. Installing software
    3. Downloading common files from the internet
    4. Anything you can think of but the more you add in your EC2 user data script the more your instance has to do at boot time.
  • The EC2 User Data script runs as the root user, meaning any command you provide will have sudo rights.

Examples of EC2 instance types you will come across

ec2 instance types
Happy cloud exploring!
I’d love to hear your thoughts, so please share them in the comment section.

Top comments (1)

Collapse
 
nenyasha profile image
Melody Mbewe

Great breakdown of EC2! It's a solid guide to effectively leverage EC2. 🌩️