Ec2 in aws

EC2 (Elastic Compute Cloud) provides resizable virtual servers in the cloud. You choose instance type (CPU, RAM), OS, and storage. It's the foundation for deploying backend applications on AWS.

Example

# Launch EC2 instance via AWS CLI
aws ec2 run-instances \
  --image-id ami-0abcdef1234567890 \
  --instance-type t2.micro \
  --key-name my-key-pair

This command launches a t2.micro EC2 instance (free tier eligible) with a specified AMI and key pair for SSH access.