This website is hosted on EC2 itself!
Go to the AWS Console and log in with your account.
Search for EC2 in the console and click Launch Instance.
Example: MyFirstWebsite.
Select Amazon Linux 2 or Ubuntu (Free Tier eligible).
Choose Proceed without a key pair for now.
Add inbound rules for HTTP (80) and HTTPS (443). Keep SSH (22) optional.
Paste this script into User Data to auto-install Apache and your site.
Click Launch and wait a few minutes.
Open it in your browser, and ð your website is live!
EC2 is a virtual server in the AWS cloud used to run applications and host websites.
EC2 = Compute power. S3 = Object storage.
A virtual firewall that controls inbound and outbound traffic.
To automate software installation and setup when the instance launches.
The instance shuts down. Data persists on EBS volume, but Public IP may change.
It automatically distributes incoming traffic across multiple EC2 instances for high availability.
Public IP changes when the instance restarts. Elastic IP is static and can be re-mapped.
Categories based on workload: General Purpose (t2/t3), Compute Optimized (c5), Memory Optimized (r5), GPU (p3), Storage Optimized (i3).
A feature that automatically adds/removes EC2 instances based on demand.
Stop = shutdown, instance can restart. Terminate = deletes instance permanently. Hibernate = saves RAM state for faster restart.