Swiftorial Logo
Home
Swift Lessons
AI Tools
Learn More
Career
Resources

AWS FAQ: What is EC2?

2. What is Amazon EC2 and how is it used?

Amazon EC2 (Elastic Compute Cloud) provides scalable virtual servers (instances) in the cloud. You can run applications, host services, and scale capacity on-demand.

πŸ—ΊοΈ Step-by-Step Instructions:

  1. Log into AWS Management Console.
  2. Navigate to EC2 and launch a new instance.
  3. Choose an AMI, instance type, and key pair.

πŸ“₯ Example Input:

AMI: Amazon Linux 2
Instance type: t2.micro

πŸ† Expected Output:

A running virtual server with SSH access on the AWS cloud.

βœ… EC2 Launch Script:

#!/bin/bash
yum update -y
yum install httpd -y
systemctl start httpd

πŸ“˜ Detailed Explanation:

  • Elasticity: Scale up/down based on traffic.
  • Customizability: Choose OS, software, and resources.
  • Pay-as-you-go: Only pay for usage.

πŸ› οΈ Use Cases:

  • Hosting websites and web apps.
  • Running back-end services or APIs.
  • Batch data processing and dev environments.