EC2
Amazon Elastic Compute Cloud (EC2) is a core web service from AWS that provides resizable compute capacity in the cloud. It allows users to rent virtual servers, known as EC2 instances, which can be quickly scaled up or down based on computing requirements.
What is an EC2 Instance?
An EC2 instance is a virtual server in Amazon's Elastic Compute Cloud (EC2) for running applications on the AWS infrastructure. Key aspects include:
- Virtual Computing Environments: Instances are virtual servers that can run applications in the cloud
- Instance Types: Come in different configurations of CPU, memory, storage, and networking capacity
- Flexible Configuration: Users can choose operating system, storage type, and networking features
- Security: Protected by security groups and can be launched in private networks (VPC)
- Scalability: Can be easily scaled up or down based on computing needs
Key EC2 Components
1. Elastic IP Addresses
An Elastic IP address is a static IPv4 address designed for dynamic cloud computing. Key features include:
- Static Nature: The IP address remains constant even if the instance is stopped or restarted
- Flexibility: Can be quickly remapped to another instance in case of failure
- Implementation:
- Navigate to EC2 Dashboard → Elastic IPs
- Click "Allocate Elastic IP address"
- Select from Amazon's pool of addresses
- Associate with your EC2 instance
2. Security Groups
Security Groups act as a virtual firewall for EC2 instances to control inbound and outbound traffic. Important aspects include:
- Stateful: If you allow inbound traffic, corresponding outbound traffic is automatically allowed
- Multiple Groups: You can assign multiple security groups to an instance