These are just basics fundamentals of EC2 I will post some more on EC2 on later blogs
Published Jan 23, 2024
EC2, or Elastic Compute Cloud, is a widely used AWS service that enables infrastructure as a service on AWS. It allows users to easily obtain and configure virtual machine instances in the cloud which virtual server. Due to its flexibility and easy to use, EC2 has become the backbone of many organizations' cloud infrastructure.
EC2 mainly consists of:
- Renting virtual machines.
- You can store data on virtual drives or (EBS)
- During traffic you can distribute loads across machines (ELB)
- You can scale the services using an auto scaling group (ASG).
Knowing EC2 is fundamental to understand how cloud works. It's because cloud is all about renting virtual servers during on-demand and EC2 is just that. With EC2 organizations can rent virtual compute capacity as they need and they don't have to buy physical servers for that. The ability to scale virtual servers up and down is one of the defining characteristics of cloud computing model.
EC2 operating system:
EC2 supports a wide variety of operating systems including Linux distributions like Amazon Linux, Ubuntu, Redhat, SUSE, and Windows Server. It also supports macOS on Mac instances.
EC2 User Data
EC2 user data scripts allow you to run commands automatically when an EC2 instance launches for the first time. This "bootstrapping" process can be used to install software updates, download files, and configure the instance without manual intervention. The user data script runs with root permissions once on the initial launch. While user data scripts are useful for automation, complex scripts can increase instance boot time.
EC2 Instance Type
There are one hundred EC2 types. You choose the type of instance that fits best into your applications. t2. micro is part of the free tier you can get up to 750 per month which represents running the instance continuously for months.
- General purpose (T2, T3, M6): ideal for web servers, code repositories, development environments
- Compute optimized (C5): high CPU for scientific modeling, gaming servers, batch processing
- Memory optimized (R6, X1): fast performance for large in-memory datasets and databases
- Storage optimized (I3): high disk throughput and IOPS for NoSQL DBs, data warehousing
- Accelerated computing (P3, G4): hardware GPUs for machine learning, graphics rendering