DEV Community

Cover image for πŸ“… Day 11 πŸš€ Amazon S3 | Simple & Secure Cloud Storage
Sudarshan Yadav
Sudarshan Yadav

Posted on

πŸ“… Day 11 πŸš€ Amazon S3 | Simple & Secure Cloud Storage

πŸ“… Day 11 πŸš€ Amazon S3 | Simple & Secure Cloud Storage

In AWS DevOps projects, storing data safely and accessing it anytime is very important.
AWS provides Amazon S3 β€” a highly scalable object storage service used worldwide.

S3 helps us:
βœ” Store any type of data (images, logs, code, backups, videos)
βœ” Access data anytime from anywhere
βœ” Host static websites like portfolios & landing pages
βœ” Store CI/CD build artifacts
βœ” Maintain backups & version control
βœ” Reduce cost using storage classes & lifecycle rules

πŸ“Œ S3 = Storage + Security + Scalability + Cost Optimization

It protects data with encryption, IAM policies & multi-AZ durability (11 9’s 🀯),
making it a must-know service for DevOps engineers! πŸ”₯

πŸš€ How to Create an S3 Bucket

1️⃣ Login to AWS Console

2️⃣ Go to S3 service

3️⃣ Click Create bucket

4️⃣ Enter a unique bucket name (globally unique)

5️⃣ Choose Region (ex: ap-south-1)

6️⃣ Keep Block Public Access ON by default

7️⃣ Click Create Bucket

βœ” Bucket created successfully πŸŽ‰

πŸ“€ How to Upload Files to S3

1️⃣ Open your bucket

2️⃣ Click Upload

3️⃣ Add files (Images, Zip, PDFs, etc.)

4️⃣ Click Upload

βœ” Files stored in S3 πŸ—‚οΈ

πŸ”— How to Connect & Access Files from S3

Method Usage
URL / Public Access Share files or host static websites
IAM Users / Roles Secure internal access
AWS CLI Upload / Download using terminal
SDKs (Python, Java, Node.js) Application-level integration
CloudFront Faster access via CDN

πŸ“Œ Access File using URL

  • Go to your object β†’ Copy Object URL
  • If file is Public β†’ URL works
  • If Private β†’ Access Denied ❌

πŸ‘‰ To make file public (only when required!)
Objects β†’ Permissions β†’ Enable Public Read Access

πŸ’» How to Connect S3 Using AWS CLI

πŸ‘‰ First configure CLI:

aws configure
Enter fullscreen mode Exit fullscreen mode

πŸ‘‰ Upload File:

aws s3 cp file.txt s3://mybucket/
Enter fullscreen mode Exit fullscreen mode

πŸ‘‰ Download File:

aws s3 cp s3://mybucket/file.txt .
Enter fullscreen mode Exit fullscreen mode

πŸ‘‰ List Buckets:

aws s3 ls
Enter fullscreen mode Exit fullscreen mode

🌐 Host a Static Website on S3

1️⃣ Upload index.html

2️⃣ Go to Properties β†’ Static website hosting β†’ Enable

3️⃣ Select index.html as the default file

4️⃣ Make index.html public

5️⃣ Copy Website Endpoint URL

6️⃣ Open in browser β†’ πŸŽ‰ Website is Live

(Optional) Use CloudFront for HTTPS + global performance

πŸ” Lifecycle Policies (Cost Optimization)

Go to: Management β†’ Lifecycle rules

Example Rules:

  • After 30 days β†’ Move to Standard-IA
  • After 90 days β†’ Move to Glacier

Thank You

πŸ”— Connect With Me

🌐 Platform πŸ”— Link
πŸ™ GitHub https://lnkd.in/d2F3JPa3
✍️ Dev.to Blog https://lnkd.in/dNtgqAME
πŸ’Ό LinkedIn https://lnkd.in/d3NctxFT
πŸ“„ Resume (Google Drive) https://lnkd.in/dHDNsd_D

πŸ”– Hashtags

AWS #DevOps #CloudComputing #AWSLearning #EBS #VolumeMounting #DataPersistence #LearningJourney #CareerGrowth #DevOpsEngineer #AWSCommunity

Top comments (0)