Day-19: Amazon S3 (Simple Storage Service)


🧠 What is Amazon S3?

Amazon S3 (Simple Storage Service) is an object storage service provided by AWS.

It allows you to store and retrieve any amount of data at any time from anywhere on the web.

S3 is designed for scalability, durability (99.999999999%), and high availability — making it one of the most reliable storage solutions.


📦 Core Concepts

Concept Description
Bucket container for storing objects (like a folder). Each bucket must have a unique name globally.
Object The actual data file stored in a bucket (like image.jpg, app.zip, etc.) along with metadata.
Key The unique name for each object inside a bucket (similar to file path).
Region The geographical location where your bucket and data reside (e.g., us-east-1ap-south-1).

🧰 Common S3 Commands (AWS CLI)

aws s3 mb s3://mybucketname               # Create bucket
aws s3 ls                                 # List all buckets
aws s3 cp file.txt s3://mybucketname/     # Upload file
aws s3 rm s3://mybucketname/file.txt      # Delete file
aws s3 rb s3://mybucketname --force       # Remove bucket with all contents


⚙️ S3 Versioning

Enable versioning:

  1. Go to S3 → Your Bucket → Properties tab.
  2. Scroll to Bucket Versioning → Enable Versioning.

✅ Benefits: