notesonly.in

One notebook for every subject — open it anywhere.

Log in

Android App Development Basics: Complete Beginner's Guide

Amazon EC2 rents you virtual computers (instances) by the hour or second. Choose the size, install software, get an internet server — no hardware to buy. Amazon S3 stores files (objects) in buckets, with effectively unlimited capacity and very high durability.

They are the foundation of most cloud architectures: EC2 is the computing brain, S3 the near-infinite hard drive. Together they let anyone run websites, store backups and process data with no upfront investment.

Key Concepts

  • Instance: a virtual EC2 server; types like t3.micro define CPU, memory and networking.
  • AMI (Amazon Machine Image): a template with the OS and software used to launch an instance.
  • Security group: a virtual firewall controlling inbound traffic, e.g. SSH on port 22, HTTP on port 80.
  • EBS (Elastic Block Store): persistent virtual disks for EC2; data survives stops and reboots.
  • Bucket: an S3 container for objects; names are globally unique across AWS.
  • Object and key: a file's key is its path-like name, e.g. photos/2026/vacation.jpg.
  • Storage classes: S3 tiers: Standard (frequent access), Intelligent-Tiering, Glacier (cheap archive).

How It Works

Launching an EC2 server: pick a region near your users, choose an AMI (e.g. Ubuntu) and a matching instance type. Configure the security group, opening only needed ports: 22 for SSH, 80/443 for web. Select a key pair, launch, and SSH in to install your application — like a physical machine in a data center.

S3 is simpler: create a uniquely-named bucket, upload objects via console, CLI or SDK; each is accessible via its key. Bucket policies control access: private, shared, or public website assets. Versioning keeps overwritten files recoverable; lifecycle rules move old objects to Glacier.

Worked Example

Cloud bills follow simple arithmetic: One instance for a month: 24 × 30 = 720 instance-hours — the number behind any per-hour price estimate. 2,000 photos × 3 MB = 6,000 MB ≈ 6 GB in S3. Downloading each once adds ~6 GB of transfer out. Instance-hours, gigabyte-months and gigabytes transferred: that is how you read an AWS bill.

Common Misconceptions

  • EC2 means renting a physical computer. You rent a slice of a shared physical host; instances stop, resize or replace in minutes.
  • S3 works like a normal filesystem. S3 has no real folders — slashes only simulate hierarchy — and you cannot append to objects.
  • Deleting a bucket frees its name instantly. Deleted bucket names can take time to become reusable — choose carefully.

Real-World Applications

  • Website hosting: blogs and company sites run on EC2 with media served from S3.
  • Backups and archives: databases and photo libraries are versioned in S3, aging into Glacier.
  • Data lakes: analytics pipelines land raw data in S3 for petabyte-scale queries.
  • Machine learning: GPU instances train models on datasets streamed from S3.

EC2 is computers on demand; S3 is storage without limits. Launch an instance, lock down its security group, manage a bucket well — and you hold the keys to nearly everything on AWS.