EC2 - Elastic Compute Cloud | AWS
Table of contents:
1. EC2 introduction
EC2 stands for Elastic compute cloud. It is a compute service provided by Amazon web services. It give freedom to its user to create there own virtual computers by using AWS's hardwares.
User can create their own virtual computer/servers according to their needs. User can easily scale up/down memory/storage/processors. Each virtualy created computers/servers are called an Instance
2. Features of EC2
- Scalability : Based on the demand of users/customer , its resources can be easily scaled up or down.
- Flexibility : It provides different type of instances, configuration to start quickly. It can easily connects with other aws services.
- Availability : You can create instances across multiple geographic regions and Availability Zones.
- Security : AWS provides robust security features, disaster recovery and other alarm & monitoring servies.
3. Components of EC2
- Instances : Every virtual computer/server created in ec2 is a instance. Get deep understanding about instance types, families, lifecycle from 👉 here
- Amazon machine images (AMIs) : It is a image which is used to launch an instance with specific OS and configurations. 👉Learn more
- Key Pairs : Its a key generated by AWS to access the instance using SSH or RDP. And used for authentication.👉Learn more
- Security Groups : Security groups are like a firewall who controls the inbound and outbound traffic of instance.👉Learn more
- Elastic Block Store (EBS) : It is the persistent storage volume for EC2 instances. It comes with different options like: HDD , SSD ... 👉Learn more
- Elastic Load Balancer (ELB) : It is used to distributes incoming traffic across multiple instances to improve application fault tolerance.👉Learn more
- Auto Scaling : It automatically adjusts the number of EC2 instances based on demand to ensure application availability and cost-efficiency.👉Learn more
4. Applictions of EC2
- Web Hosting : Deploy scalable and high-availability web applications.
- Big Data Analytics : Process large datasets with compute-optimized instances.
- Machine Learning : Train and deploy ML models using GPU instances.
- Disaster Recovery : Set up backup environments with minimal upfront costs.
- Gaming : Host game servers with low latency and high performance.
- Dev/Test Environments : Quickly spin up environments for development and testing purposes.
5. Best security practices
- Secure Access : Use key pairs for SSH access and avoid using default credentials.
- Least Privilege Principle : Assign minimal IAM roles and permissions required for tasks.
- Regular Patching : Keep operating systems and applications updated with the latest security patches.
- Monitor and Audit : Use AWS CloudTrail and Amazon CloudWatch for logging and monitoring activities.
- Implement Security Groups and NACLs : Define strict inbound and outbound traffic rules.
- Enable Encryption : Encrypt EBS volumes and data in transit using SSL/TLS.