Amazon EC2 Overview
Amazon EC2 offers scalable compute capacity in the cloud with various pricing and configuration options to meet diverse workloads.
Pricing Models
- On-Demand – Pay by the hour or second with no long-term commitment.
- Spot – Pay for unused capacity at up to 90% discount; ideal for flexible, interruptible workloads.
- Reserved – Reserve capacity with 1 or 3-year commitments for up to 72% discount.
- Savings Plan – Flexible pricing model with commitment for 1 or 3-year commitments, offering up to 66% discount.
- Dedicated – Access to a physical server dedicated to a single user for regulatory or compliance requirements.
Security Group
Security Groups act as virtual firewalls controlling inbound and outbound traffic for EC2 instances.
Feature | Description |
---|---|
Changes take effect immediately | Any changes to rules apply instantly to associated instances. |
Attachments | Can be attached to multiple EC2 instances and instances can have multiple security groups attached. |
Inbound Traffic | Blocked by default; only traffic allowed by rules can enter. |
Outbound Traffic | Allowed by default; outbound traffic can be restricted by custom rules. |
Networking Enhancements
- Basic Networking – Standard networking capabilities.
- Enhanced Networking – Provides network speeds between 10–100 Gbps for high throughput and low latency.
- Elastic Fabric Adapter (EFA) – Ideal for High-Performance Computing (HPC) and Machine Learning applications requiring low-latency communication.
Placement Groups
EC2 Placement Groups determine how instances are placed on hardware for specific performance or redundancy needs.
Type | Description | Use Case |
---|---|---|
Cluster | Low latency, high throughput within a single AZ. | Applications requiring high network throughput. |
Spread | Instances are placed on distinct hardware to reduce impact of failures. | For critical instances that must remain isolated from each other. |
Partition | Instances are grouped into multiple partitions within an AZ. | Big data workloads or applications with fault tolerance requirements. |
Cluster Limitations:
- Cannot span multiple Availability Zones.
- Only supports compute, GPU, memory, and storage instance types.
- Instances within a cluster placement group should be homogeneous.
- Cannot merge multiple placement groups.
- Existing instances can be moved into placement groups.
Additional Features
- Spot Fleet – A collection of Spot Instances and, optionally, On-Demand Instances to meet target capacity.
- VMware Integration – EC2 can deploy VMware environments through vCenter.
Placement Groups offer specific configurations for improved network performance and fault tolerance. Choose the type based on application’s requirements.