<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Rizwan</title>
    <description>The latest articles on DEV Community by Muhammad Rizwan (@muhammad_rizwan_52cf1d16c).</description>
    <link>https://dev.to/muhammad_rizwan_52cf1d16c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4128579%2Fbe6fe5ea-2d61-450f-bbb2-eaff1c8f1d6f.png</url>
      <title>DEV Community: Muhammad Rizwan</title>
      <link>https://dev.to/muhammad_rizwan_52cf1d16c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammad_rizwan_52cf1d16c"/>
    <language>en</language>
    <item>
      <title>AWS S3: A Practical Beginner’s Guide to Amazon Simple Storage Service</title>
      <dc:creator>Muhammad Rizwan</dc:creator>
      <pubDate>Wed, 16 Sep 2026 19:15:54 +0000</pubDate>
      <link>https://dev.to/muhammad_rizwan_52cf1d16c/aws-s3-a-practical-beginners-guide-to-amazon-simple-storage-service-4c4e</link>
      <guid>https://dev.to/muhammad_rizwan_52cf1d16c/aws-s3-a-practical-beginners-guide-to-amazon-simple-storage-service-4c4e</guid>
      <description>&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;If you're starting your journey into AWS, Cloud Computing, or DevOps, there's a very good chance the first service you'll touch i s &lt;strong&gt;Amazon S3 (Simple Storage Service)&lt;/strong&gt;. It's one of the oldest, most widely used, and most beginner-friendly services AWS offers — and understanding it well will make almost everything else in AWS easier to learn.&lt;/p&gt;

&lt;p&gt;In this guide, we'll break down S3 from the ground up: what it is, how it works, how to create and use buckets, how to secure your data, and how to complete a small hands-on project. No prior AWS experience is required — just curiosity and a free-tier AWS account.&lt;/p&gt;

&lt;p&gt;By the end of this article, you'll be comfortable creating buckets, uploading files, using the AWS CLI, and applying basic security best practices.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. What is Amazon S3?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Amazon S3 (Simple Storage Service)&lt;/strong&gt; is a fully managed &lt;strong&gt;object storage&lt;/strong&gt; service provided by AWS. It allows you to store and retrieve any amount of data, at any time, from anywhere on the web.&lt;/p&gt;

&lt;p&gt;Unlike traditional file systems that organize data in folders and directories on a single disk, S3 stores data as &lt;strong&gt;objects&lt;/strong&gt; inside logical containers called &lt;strong&gt;buckets&lt;/strong&gt;. This design makes S3:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Highly durable&lt;/strong&gt; — AWS designs S3 for 99.999999999% (11 nines) durability of objects over a given year&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Highly scalable&lt;/strong&gt; — you don't provision storage capacity; it grows automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost-effective&lt;/strong&gt; — you pay only for what you use&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accessible&lt;/strong&gt; — objects can be retrieved via HTTPS, the AWS CLI, SDKs, or the AWS Console&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Common use cases include storing website assets, backups, application data, logs, media files, and serving as the foundation for data lakes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Note:&lt;/strong&gt; S3 is &lt;em&gt;not&lt;/em&gt; a traditional file system or block storage like Amazon EBS. It's built for storing independent objects, not for running an operating system or a database directly on it.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. How S3 Works
&lt;/h2&gt;

&lt;p&gt;At a high level, S3 works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You create a &lt;strong&gt;bucket&lt;/strong&gt; (a container for your data).&lt;/li&gt;
&lt;li&gt;You upload files into that bucket — each file becomes an &lt;strong&gt;object&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Every object is identified by a unique &lt;strong&gt;object key&lt;/strong&gt; within the bucket.&lt;/li&gt;
&lt;li&gt;You (or your application) can then read, update, or delete objects using the AWS Console, CLI, SDKs, or REST API.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Graphic 1 — How S3 Works&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Image Prompt:&lt;/strong&gt; A simple, clean horizontal flow diagram with four connected stages: a "User" icon (laptop/person), an arrow pointing to an "AWS S3" cloud icon, an arrow pointing to a "Bucket" icon (a labeled storage container), and a final arrow pointing to three small object icons labeled &lt;code&gt;image.jpg&lt;/code&gt;, &lt;code&gt;document.pdf&lt;/code&gt;, and &lt;code&gt;backup.zip&lt;/code&gt;. Flat vector style, AWS orange and blue color palette, minimal and professional, white background.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Caption: A simplified flow of how data moves from a user into an S3 bucket as objects.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Placement: Immediately after this section's introduction, before Section 4 (S3 Bucket).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This simplicity is what makes S3 so powerful — there's no server to manage, no storage capacity to plan for, and no complex configuration required to get started.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. S3 Bucket
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;bucket&lt;/strong&gt; is the top-level container in S3 where your objects are stored. Think of it as a highly durable, infinitely scalable "root folder" in the cloud.&lt;/p&gt;

&lt;p&gt;Key facts about buckets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bucket names must be &lt;strong&gt;globally unique&lt;/strong&gt; across all of AWS (not just your account)&lt;/li&gt;
&lt;li&gt;Bucket names must be lowercase, 3–63 characters, and follow DNS naming rules&lt;/li&gt;
&lt;li&gt;Each bucket is created in a specific &lt;strong&gt;AWS Region&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You can store an unlimited number of objects in a bucket&lt;/li&gt;
&lt;li&gt;Buckets have their own permissions, policies, and configuration settings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example of a valid bucket name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-devto-s3-demo-bucket-2026
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Warning:&lt;/strong&gt; Because bucket names are globally unique, avoid using predictable or generic names for production workloads — attackers sometimes scan for common bucket names to find misconfigured public buckets.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5. S3 Object
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;object&lt;/strong&gt; is the actual piece of data you store in S3 — essentially, a file plus some metadata. Every object consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data&lt;/strong&gt; — the actual file content (image, document, video, backup, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata&lt;/strong&gt; — a set of name/value pairs describing the object (content type, size, last modified date, custom tags, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Object Key&lt;/strong&gt; — the unique identifier for that object within the bucket&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Objects can range in size from &lt;strong&gt;0 bytes to 5TB&lt;/strong&gt;, and a single bucket can hold virtually unlimited objects.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Object Key
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;object key&lt;/strong&gt; is the unique name that identifies an object inside a bucket. S3 doesn't have real folders — instead, it uses &lt;strong&gt;key prefixes&lt;/strong&gt; that &lt;em&gt;simulate&lt;/em&gt; a folder structure.&lt;/p&gt;

&lt;p&gt;For example, if you upload a file with the key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;images/2026/vacation-photo.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AWS Console will display this as if it's inside folders named &lt;code&gt;images&lt;/code&gt; and &lt;code&gt;2026&lt;/code&gt;, but internally, S3 just stores it as one flat object with that full key string.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;Traditional File System&lt;/th&gt;
&lt;th&gt;Amazon S3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Storage unit&lt;/td&gt;
&lt;td&gt;File&lt;/td&gt;
&lt;td&gt;Object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Location identifier&lt;/td&gt;
&lt;td&gt;File path&lt;/td&gt;
&lt;td&gt;Object key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Folder structure&lt;/td&gt;
&lt;td&gt;Real, nested directories&lt;/td&gt;
&lt;td&gt;Simulated via key prefixes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access method&lt;/td&gt;
&lt;td&gt;Local/network file access&lt;/td&gt;
&lt;td&gt;HTTPS, CLI, SDK, REST API&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  7. Creating an S3 Bucket
&lt;/h2&gt;

&lt;p&gt;You can create a bucket using the AWS Console, AWS CLI, or Infrastructure as Code tools like CloudFormation or Terraform. Let's start with the Console approach, then move to the CLI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps using the AWS Console:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign in to the AWS Management Console&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;S3&lt;/strong&gt; service&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create bucket&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enter a globally unique bucket name&lt;/li&gt;
&lt;li&gt;Choose an AWS Region close to your users&lt;/li&gt;
&lt;li&gt;Keep &lt;strong&gt;Block all public access&lt;/strong&gt; enabled (default and recommended)&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create bucket&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[SCREENSHOT PLACEHOLDER: AWS S3 "Create bucket" configuration screen]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This screenshot should show the S3 console's bucket creation form, including fields for bucket name, AWS Region selection, and the "Block Public Access settings" section with all four options checked (enabled) by default.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a bucket using the AWS CLI:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 mb s3://my-devto-s3-demo-bucket-2026 &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;✅ This command creates a new bucket named &lt;code&gt;my-devto-s3-demo-bucket-2026&lt;/code&gt; in the &lt;code&gt;us-east-1&lt;/code&gt; region.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  8. Uploading a File
&lt;/h2&gt;

&lt;p&gt;Once your bucket exists, you can upload files (objects) into it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using the AWS Console:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your bucket&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Upload&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select your file(s)&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Upload&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[SCREENSHOT PLACEHOLDER: AWS S3 bucket "Upload" screen showing selected files ready to upload]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This screenshot should show the file upload interface with a selected file listed, along with the "Upload" button.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using the AWS CLI:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;cp&lt;/span&gt; ./example.txt s3://my-devto-s3-demo-bucket-2026/example.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This uploads &lt;code&gt;example.txt&lt;/code&gt; from your local machine into the bucket, using &lt;code&gt;example.txt&lt;/code&gt; as the object key.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. AWS CLI Commands for S3
&lt;/h2&gt;

&lt;p&gt;Here are the most common AWS CLI commands you'll use when working with S3.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;List all buckets:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create a bucket:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 mb s3://my-devto-s3-demo-bucket-2026
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Upload a file:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;cp&lt;/span&gt; ./file.txt s3://my-devto-s3-demo-bucket-2026/file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;List objects in a bucket:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;ls &lt;/span&gt;s3://my-devto-s3-demo-bucket-2026
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Download a file:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;cp &lt;/span&gt;s3://my-devto-s3-demo-bucket-2026/file.txt ./file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Delete an object:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;rm &lt;/span&gt;s3://my-devto-s3-demo-bucket-2026/file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sync a local directory with a bucket:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;sync&lt;/span&gt; ./local-folder s3://my-devto-s3-demo-bucket-2026/backup-folder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Tip:&lt;/strong&gt; &lt;code&gt;aws s3 sync&lt;/code&gt; only uploads files that are new or have changed, making it ideal for backups and repeated deployments.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  10. S3 Storage Classes
&lt;/h2&gt;

&lt;p&gt;S3 offers multiple &lt;strong&gt;storage classes&lt;/strong&gt; so you can optimize cost based on how frequently you access your data.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Storage Class&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;th&gt;Availability&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Standard&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Frequently accessed data&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Default choice for active workloads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Intelligent-Tiering&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Unpredictable access patterns&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Automatically moves data between tiers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;S3 Standard-IA&lt;/strong&gt; (Infrequent Access)&lt;/td&gt;
&lt;td&gt;Data accessed less often but needed quickly&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Lower storage cost, retrieval fee applies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 One Zone-IA&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Infrequent, non-critical data&lt;/td&gt;
&lt;td&gt;Single AZ&lt;/td&gt;
&lt;td&gt;Cheaper, but less resilient&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Glacier Instant Retrieval&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Archival data needing millisecond access&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Low-cost archival with fast retrieval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Glacier Flexible Retrieval&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Long-term archives, rare access&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Retrieval takes minutes to hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Glacier Deep Archive&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Rarely accessed, long-term compliance data&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Lowest cost, retrieval takes hours&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Graphic 3 — S3 Storage Classes&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Image Prompt:&lt;/strong&gt; A clean infographic with seven vertically stacked or horizontally arranged cards, each representing an S3 storage class (Standard, Intelligent-Tiering, Standard-IA, One Zone-IA, Glacier Instant Retrieval, Glacier Flexible Retrieval, Glacier Deep Archive). Each card uses a simple icon (lightning bolt for fast access, snowflake for cold storage, clock for retrieval time) and a short label. Flat design, consistent AWS-style color palette, professional and easy to scan.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Caption: A quick visual comparison of S3 storage classes based on access frequency and cost.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Placement: Directly below this section's table.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Tip:&lt;/strong&gt; Start with &lt;strong&gt;S3 Standard&lt;/strong&gt; while learning, and explore other classes once you understand real access patterns for your data.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  11. S3 Versioning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Versioning&lt;/strong&gt; allows S3 to keep multiple versions of the same object in a bucket. This protects against accidental overwrites and deletions.&lt;/p&gt;

&lt;p&gt;When versioning is enabled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every update to an object creates a &lt;strong&gt;new version&lt;/strong&gt; instead of overwriting it&lt;/li&gt;
&lt;li&gt;Deleting an object adds a &lt;strong&gt;delete marker&lt;/strong&gt; instead of permanently removing it&lt;/li&gt;
&lt;li&gt;You can restore any previous version at any time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Enable versioning via CLI:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api put-bucket-versioning &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--bucket&lt;/span&gt; my-devto-s3-demo-bucket-2026 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--versioning-configuration&lt;/span&gt; &lt;span class="nv"&gt;Status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Warning:&lt;/strong&gt; Versioning increases storage usage (and cost) since old versions are retained. Combine it with lifecycle rules to automatically clean up old versions.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  12. S3 Lifecycle Rules
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Lifecycle rules&lt;/strong&gt; automate the process of transitioning or deleting objects over time, helping you manage costs without manual effort.&lt;/p&gt;

&lt;p&gt;Common lifecycle actions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transition objects to a cheaper storage class after a certain number of days&lt;/li&gt;
&lt;li&gt;Permanently delete objects after a retention period&lt;/li&gt;
&lt;li&gt;Clean up old object versions (if versioning is enabled)&lt;/li&gt;
&lt;li&gt;Remove incomplete multipart uploads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example lifecycle rule (JSON):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"ID"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MoveToGlacierAfter30Days"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Enabled"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Filter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Prefix"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"backups/"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Transitions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"Days"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"StorageClass"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GLACIER"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Expiration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Days"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;365&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This rule moves any object under the &lt;code&gt;backups/&lt;/code&gt; prefix to Glacier after 30 days, and deletes it entirely after 365 days.&lt;/p&gt;




&lt;h2&gt;
  
  
  13. S3 Security
&lt;/h2&gt;

&lt;p&gt;Security is one of the most important aspects of using S3 correctly. Misconfigured buckets are a common cause of real-world data breaches, so it's essential to understand S3's security model from day one.&lt;/p&gt;

&lt;p&gt;Key security mechanisms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Block Public Access&lt;/strong&gt; — a bucket-level setting that prevents public access, even if a policy accidentally allows it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bucket Policies&lt;/strong&gt; — JSON documents that define who can access a bucket and what actions they can perform&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM Policies&lt;/strong&gt; — permissions attached to users, groups, or roles that control access to S3 resources&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access Control Lists (ACLs)&lt;/strong&gt; — a legacy access-control mechanism (AWS now recommends using policies instead)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Graphic 4 — S3 Security&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Image Prompt:&lt;/strong&gt; A layered security diagram showing a "User" icon on the left, an arrow into an "IAM" shield icon, another arrow into an "S3 Bucket" icon, and a final arrow into an "Object" icon. Around the bucket, add small labeled badges: "IAM Permissions," "Bucket Policy," "Encryption," and "Block Public Access." Flat, professional vector style with a blue/orange security-themed palette, clean white background.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Caption: A layered view of how IAM, bucket policies, and encryption work together to secure S3 data.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Placement: At the start of this section, before the bullet list.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Example bucket policy that denies public access explicitly:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Sid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DenyPublicReadAccess"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Deny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::my-devto-s3-demo-bucket-2026/*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Condition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Bool"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"aws:SecureTransport"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"false"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Warning:&lt;/strong&gt; Never attach a bucket policy that grants &lt;code&gt;"Principal": "*"&lt;/code&gt; with &lt;code&gt;"Effect": "Allow"&lt;/code&gt; on sensitive data unless you fully intend for that data to be publicly readable. This is one of the most common causes of accidental public data exposure on AWS.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  14. S3 Encryption
&lt;/h2&gt;

&lt;p&gt;S3 supports encryption both &lt;strong&gt;at rest&lt;/strong&gt; and &lt;strong&gt;in transit&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Encryption in transit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enforced via HTTPS (TLS) when accessing S3 endpoints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Encryption at rest options:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SSE-S3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;S3-managed keys; encryption is automatic and free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SSE-KMS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AWS Key Management Service–managed keys; adds auditability and control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SSE-C&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Customer-provided keys; you manage the encryption key yourself&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Enable default encryption via CLI:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api put-bucket-encryption &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--bucket&lt;/span&gt; my-devto-s3-demo-bucket-2026 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--server-side-encryption-configuration&lt;/span&gt; &lt;span class="s1"&gt;'{
    "Rules": [
      {
        "ApplyServerSideEncryptionByDefault": {
          "SSEAlgorithm": "AES256"
        }
      }
    ]
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Tip:&lt;/strong&gt; As a beginner, start with &lt;strong&gt;SSE-S3&lt;/strong&gt; (the default, no extra cost) before exploring SSE-KMS for more advanced key management needs.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  15. S3 and IAM
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;IAM (Identity and Access Management)&lt;/strong&gt; works hand-in-hand with S3 to control &lt;em&gt;who&lt;/em&gt; can do &lt;em&gt;what&lt;/em&gt; to your buckets and objects.&lt;/p&gt;

&lt;p&gt;Instead of relying only on bucket policies, you can attach an &lt;strong&gt;IAM policy&lt;/strong&gt; to a specific user or role, granting fine-grained permissions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example IAM policy allowing read-only access to one bucket:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"s3:ListBucket"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::my-devto-s3-demo-bucket-2026"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::my-devto-s3-demo-bucket-2026/*"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Best practice:&lt;/strong&gt; Follow the &lt;strong&gt;principle of least privilege&lt;/strong&gt; — only grant the exact permissions a user or application needs, nothing more.&lt;/p&gt;




&lt;h2&gt;
  
  
  16. Static Website Hosting with S3
&lt;/h2&gt;

&lt;p&gt;S3 can host a &lt;strong&gt;static website&lt;/strong&gt; (HTML, CSS, JavaScript, and images) directly, without needing a traditional web server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to enable static website hosting:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your bucket in the AWS Console&lt;/li&gt;
&lt;li&gt;Go to the &lt;strong&gt;Properties&lt;/strong&gt; tab&lt;/li&gt;
&lt;li&gt;Scroll to &lt;strong&gt;Static website hosting&lt;/strong&gt; and click &lt;strong&gt;Edit&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enable hosting and specify an index document (e.g., &lt;code&gt;index.html&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Ensure the bucket allows public read access &lt;strong&gt;only if this is genuinely intended&lt;/strong&gt; (static websites usually need to be public)
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[SCREENSHOT PLACEHOLDER: AWS S3 "Static website hosting" configuration panel]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This screenshot should show the static website hosting settings, including fields for the index document and error document.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Warning:&lt;/strong&gt; Enabling public access for a static website is intentional and appropriate for that use case — but never apply the same public settings to buckets holding private or sensitive data.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  17. Common S3 Use Cases
&lt;/h2&gt;

&lt;p&gt;S3 is used across almost every type of application. Common examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backup and restore&lt;/strong&gt; — storing backups of databases, servers, or applications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static website hosting&lt;/strong&gt; — hosting HTML/CSS/JS sites directly from a bucket&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data lakes and analytics&lt;/strong&gt; — centralized storage for big data processing (e.g., with Amazon Athena or EMR)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Media storage and delivery&lt;/strong&gt; — storing images, videos, and audio files, often paired with Amazon CloudFront&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application asset storage&lt;/strong&gt; — storing files uploaded by users in web or mobile apps&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Log storage&lt;/strong&gt; — centralizing logs from AWS services like CloudTrail, ELB, or CloudFront&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disaster recovery&lt;/strong&gt; — cross-region replication for business continuity&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  18. Practical Beginner S3 Project
&lt;/h2&gt;

&lt;p&gt;Let's put everything together with a hands-on project: &lt;strong&gt;"Upload and Manage Files with Amazon S3."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Graphic 5 — Practical S3 Workflow&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Image Prompt:&lt;/strong&gt; A vertical step-by-step flowchart with six connected stages, each in a rounded rectangle: "Create Bucket" → "Upload Object" → "Configure Permissions" → "Enable Versioning" → "Configure Lifecycle" → "Access Object." Use simple arrows connecting each step, flat vector icons beside each label (bucket icon, upload icon, lock icon, clock icon, recycle icon, eye icon), consistent blue/orange color scheme, clean white background.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Caption: The end-to-end workflow we'll follow in this hands-on project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Placement: At the top of this section, before Step 1.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account (the AWS Free Tier is sufficient)&lt;/li&gt;
&lt;li&gt;AWS CLI installed and configured (&lt;code&gt;aws configure&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Basic familiarity with the terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: Create the Bucket
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 mb s3://my-first-s3-project-2026
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Upload a File
&lt;/h3&gt;

&lt;p&gt;Create a simple text file locally, then upload it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello from my first S3 project!"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; hello.txt
aws s3 &lt;span class="nb"&gt;cp &lt;/span&gt;hello.txt s3://my-first-s3-project-2026/hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Check the Object
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;ls &lt;/span&gt;s3://my-first-s3-project-2026
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see &lt;code&gt;hello.txt&lt;/code&gt; listed as an object in your bucket.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Using the AWS CLI to Retrieve the File
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;cp &lt;/span&gt;s3://my-first-s3-project-2026/hello.txt ./downloaded-hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Enable Versioning
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api put-bucket-versioning &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--bucket&lt;/span&gt; my-first-s3-project-2026 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--versioning-configuration&lt;/span&gt; &lt;span class="nv"&gt;Status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, try uploading a modified version of &lt;code&gt;hello.txt&lt;/code&gt; and notice that S3 keeps both versions instead of overwriting the original.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Configure a Lifecycle Rule
&lt;/h3&gt;

&lt;p&gt;Create a file named &lt;code&gt;lifecycle.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"ID"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DeleteOldVersions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Enabled"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Filter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"NoncurrentVersionExpiration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"NoncurrentDays"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api put-bucket-lifecycle-configuration &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--bucket&lt;/span&gt; my-first-s3-project-2026 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--lifecycle-configuration&lt;/span&gt; file://lifecycle.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This rule automatically deletes non-current (old) object versions after 30 days.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7: Basic Security Considerations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Confirm &lt;strong&gt;Block Public Access&lt;/strong&gt; is still enabled (it is, by default)&lt;/li&gt;
&lt;li&gt;Avoid attaching any policy with &lt;code&gt;"Principal": "*"&lt;/code&gt; unless you specifically intend for the content to be public&lt;/li&gt;
&lt;li&gt;Consider enabling default encryption, as shown in Section 14&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 8: Cleanup — Delete Resources When Finished
&lt;/h3&gt;

&lt;p&gt;To avoid unnecessary charges, clean up your test resources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Delete the object&lt;/span&gt;
aws s3 &lt;span class="nb"&gt;rm &lt;/span&gt;s3://my-first-s3-project-2026/hello.txt

&lt;span class="c"&gt;# Remove all objects and versions, then delete the bucket&lt;/span&gt;
aws s3 rb s3://my-first-s3-project-2026 &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Warning:&lt;/strong&gt; &lt;code&gt;aws s3 rb --force&lt;/code&gt; permanently deletes the bucket and all objects/versions inside it. Double-check the bucket name before running this command.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  19. Important S3 Concepts to Remember
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;S3 stores &lt;strong&gt;objects&lt;/strong&gt;, not traditional files, inside &lt;strong&gt;buckets&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Bucket names must be &lt;strong&gt;globally unique&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;S3 has no real folders — it simulates them using &lt;strong&gt;key prefixes&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Choose the right &lt;strong&gt;storage class&lt;/strong&gt; based on access frequency&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versioning&lt;/strong&gt; protects against accidental overwrites/deletions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lifecycle rules&lt;/strong&gt; automate cost optimization&lt;/li&gt;
&lt;li&gt;Always keep &lt;strong&gt;Block Public Access&lt;/strong&gt; enabled unless hosting a public static website&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;IAM policies&lt;/strong&gt; and &lt;strong&gt;bucket policies&lt;/strong&gt; together, following least privilege&lt;/li&gt;
&lt;li&gt;Enable &lt;strong&gt;encryption&lt;/strong&gt; for data at rest whenever possible&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  20. Conclusion
&lt;/h2&gt;

&lt;p&gt;Amazon S3 is a foundational AWS service that you'll encounter in almost every cloud, DevOps, or backend engineering role. By understanding buckets, objects, keys, storage classes, versioning, lifecycle rules, and security fundamentals, you now have a solid, practical foundation to build on.&lt;/p&gt;

&lt;p&gt;The best way to reinforce this knowledge is to keep practicing: create a few test buckets, experiment with the CLI, try enabling versioning and lifecycle rules, and always remember to clean up your resources afterward to avoid unnecessary costs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Amazon S3 is a scalable, durable, and cost-effective object storage service&lt;/li&gt;
&lt;li&gt;Data is organized into &lt;strong&gt;buckets&lt;/strong&gt; and &lt;strong&gt;objects&lt;/strong&gt;, identified by unique &lt;strong&gt;keys&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Security should always be a priority — use IAM, bucket policies, and encryption together&lt;/li&gt;
&lt;li&gt;Storage classes and lifecycle rules help you control costs as your usage grows&lt;/li&gt;
&lt;li&gt;Hands-on practice is the fastest way to build real S3 confidence&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Let's Connect!
&lt;/h2&gt;

&lt;p&gt;If you found this guide helpful, I'd love to hear about your own AWS learning journey. What was the first AWS service you learned, and what tripped you up the most when you were starting out? Share your experience in the comments below — let's learn together! 🚀&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt; #aws #cloud #devops #tutorial&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>devops</category>
      <category>tutorial</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
