Amazon EC2
View on GitHubAmazon EC2
Amazon EC2 provides resizable virtual servers (instances) in the cloud for running guest operating systems and applications. It operates as an infrastructure service where customers launch, configure, and manage instances inside an Amazon VPC and choose instance types, storage, and networking. EC2 typically forms the compute layer in AWS architectures and connects to block storage, load balancers, monitoring, and other managed services.
🗂 Resource Category
Compute • Networking and Content Delivery
🧠 Exam Memory Hook
Think: "Full OS control + Virtual server + Custom software = Amazon EC2"
📖 Ownership
Classification: Shared Responsibility Service
AWS responsibilities: AWS operates and maintains the underlying physical datacenter infrastructure, network fabric, host hardware, hypervisor, and the EC2 control plane; AWS is responsible for patching and securing the physical infrastructure and hypervisor and for providing the APIs and management console for EC2 instance lifecycle.
Customer responsibilities: The customer configures instance operating systems, installed software, application code, security groups, network ACLs, IAM roles for instances, encryption options, AMIs, and backup and recovery; the customer is responsible for securing, monitoring, and maintaining the guest OS, application runtimes, libraries, and data on EC2 instances.
Patching responsibilities: AWS patches the physical infrastructure and the hypervisor layer. The customer patches the guest operating system, installed runtimes, application libraries, dependencies, and customer-deployed applications; guest OS patching can be automated by customer-configured tools such as AWS Systems Manager but remains the customer's responsibility.
🏗 Typical Architecture
💡 Top 5 Features
- Wide selection of instance types and sizes tuned for CPU, memory, storage, or GPU workloads.
- Attachable durable block storage using Amazon EBS volumes to persist instance data separately from the instance lifecycle.
- Configurable networking including Elastic Network Interfaces, security groups, Elastic IP addresses, and placement within Availability Zones.
- Instance lifecycle controls and imaging through AMIs enabling start, stop, reboot, and AMI-based cloning and snapshots.
- Instance profiles and IAM roles provide credential management for applications running on instances without embedding long-lived credentials.
✅ Top 5 Use Cases
- Hosting traditional monolithic applications that require full control over the operating system and runtime environment.
- Running custom or legacy software that requires specific kernel modules, drivers, or OS-level configuration.
- Performing batch processing, high-performance computing, or GPU-accelerated compute tasks where specific instance types are required.
- Lift-and-shift migrations of on-premises virtual machines to cloud-based virtual servers while retaining admin control.
- Operating container hosts or self-managed container orchestrators when customers prefer VM-based control rather than managed container services.
🏗 Architecture Placement
EC2 instances run inside an Amazon VPC and commonly serve as the compute tier receiving traffic from load balancers or other services; they connect to block storage such as EBS and to managed services like databases or caches. Instances are provisioned in Availability Zones within a region and typically integrate with monitoring, IAM, and networking services. Placement and network exposure depend on whether instances are launched in public or private subnets and on configured routing and security controls.
🎯 Commonly Used With
- Amazon VPC
- Amazon EBS
- AWS Identity and Access Management
- Amazon CloudWatch
- AWS Systems Manager
🌍 5 Real-World Examples
- A retail company hosts its legacy order-processing application on EC2 to retain full OS-level control and integrate with on-premises systems during migration.
- A healthcare research team uses GPU-enabled EC2 instances to run medical imaging analytics where custom drivers and libraries are required.
- A media company runs video transcoding worker fleets on EC2 to process uploads with scale controlled by Auto Scaling groups.
- A financial services firm runs proprietary risk models on EC2 instances that require tuned instance types and isolated networking.
- A telecommunications operator deploys virtual network functions on EC2 to run customer-managed network services with specific OS configurations.
🎓 AWS Exam Clues
- Select EC2 when you need full administrative control of the operating system and installed software.
- Choose managed services (for example managed databases) when you want AWS to handle OS and platform patching instead of EC2-hosted software.
- Consider Auto Scaling and load balancers with EC2 for horizontal scaling rather than manual instance lifecycle management.
- Remember the customer is responsible for guest OS patching and instance-level security controls such as security groups and OS firewalls.
- Use Spot instances for interruptible workloads when cost trade-offs are acceptable and state persistence is managed externally.
📝 Quick Revision
Amazon EC2 provides virtual machines for workloads that require control of the operating system and runtime. Use EC2 for custom, legacy, or specialized compute needs while planning for guest OS patching, networking, storage attachment, and monitoring.
🏷 Keywords
instance types • AMIs • Amazon EBS • Elastic Network Interface • security groups • key pairs • instance metadata • Auto Scaling • placement groups • Elastic IP • instance profile • spot instances