🗂️ Amazon S3 – Simple Storage Service: A Beginner’s Guide

KubeCraftsmanKubeCraftsman
3 min read

📌 What Is Amazon S3?

Amazon S3 (Simple Storage Service) is a cloud-based object storage service offered by AWS. It allows you to store and retrieve any amount of data, from anywhere on the internet. Whether you’re backing up files, hosting a static website, or storing app data, S3 is the go-to tool.


🚀 Common Use Cases

  • Hosting static websites (HTML, CSS, JS)

  • Storing images, videos, and documents

  • Saving log files from applications

  • Performing data backups

  • Working as an origin for CDNs (e.g., CloudFront)


🧠 Beginner Tip

Use S3 to host a static HTML website for free (or almost free) — no servers, no VMs, just simple file hosting.


🛠️ Step-by-Step Guide to Using Amazon S3

✅ Step 1: Open the S3 Console


✅ Step 2: Create a Bucket

  1. Name your bucket (e.g., s3-devopstackzone)

  2. Choose a region

  3. Uncheck "Block all public access" if you want to host a website

  4. Confirm and click “Create bucket”


✅ Step 3: Upload Files

  • Open your bucket → Click Upload

  • Add HTML/CSS files, images, or videos

  • Click “Upload” to finish


✅ Step 4: Make Files Public

To allow public access:

  1. Select the file(s)

  2. Go to Actions → Make public

  3. OR use a bucket policy (see Step 6)


✅ Step 5: Enable Static Website Hosting

  1. Go to Bucket > Properties

  2. Scroll down to Static website hosting

  3. Enable it, and set:

    • Index document: index.html

    • Error document: error.html (optional)

  4. Save changes

You’ll receive a website endpoint URL like:

http://s3-devopstackzone.s3-website-us-east-1.amazonaws.com

✅ Step 6: Add a Bucket Policy for Public Access

Go to Permissions > Bucket Policy and add:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "PublicReadGetObject",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::s3-devopstackzone/*"
    }
  ]
}

📌 Replace "s3-devopstackzone" with your actual bucket name.


✅ Step 7: Access Your Website or Files

  • Static site: Use the website URL from step 5

  • Public file:
    https://s3-devopstackzone.s3.amazonaws.com/image.png


⚙️ Optional: Use AWS CLI for Quick Uploads

aws s3 mb s3://my-bucket-name
aws s3 cp index.html s3://my-bucket-name/
aws s3 sync ./static-site/ s3://my-bucket-name/

📚 Summary

FeatureDescription
Object StorageStore files, not databases
BucketContainer for your objects (files)
Public AccessControlled via permissions or policies
Static HostingHost HTML/CSS/JS sites without a server
PricingPay only for what you store or transfer

🏁 Final Thoughts

Amazon S3 is powerful yet simple for beginners. Whether you’re testing a static site or backing up images, this tool scales from personal use to enterprise-grade projects.

0
Subscribe to my newsletter

Read articles from KubeCraftsman directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

KubeCraftsman
KubeCraftsman