General
Hands-On with Amazon S3: Buckets, Permissions, Lifecycle Rules and Static Hosting published: true tags: aws, devops, s3 cover
Toqeer Afzal DEV Community 周榜
3 views
Hands-On with Amazon S3: Buckets, Permissions, Lifecycle Rules, and Static Hosting Explained
Introduction
Cloud storage sounds abstract until you actually create a bucket, upload a file into it, and watch access rules decide who can — and can't — see that file. That's exactly the exercise this article is built on: a hands-on AWS lab covering S3 buckets, object uploads, storage classes, bucket policies, ACLs/permissions, intelligent tiering through a lifecycle rule, and static website hosting.
If you're learning cloud computing or preparing for DevOps/cloud work, S3 is one of the first services worth understanding deeply — not just because it's common but because it forces you to think about storage, access control, cost, and availability all at once.
In this post, you'll learn what each of these S3 concepts means, how they connect to each other, and how a bucket goes from "empty storage" to a fully configured, cost-optimized, publicly hosted resource.
Quick Overview
The lab covered the following core building blocks:
Buckets — the top-level container for storing data in S3.
Objects — the actual files uploaded into a bucket.
Upload — the process of putting objects into a bucket.
Storage Classes — different tiers for storing objects based on access needs.
Bucket Policy — a resource-level, JSON-based permission set attached to a bucket.
ACL (Access Control List) & Permissions — access control at the bucket/object level.
Intelligent Tiering — an S3 storage class that automatically optimizes cost based on access patterns.
Lifecycle Configuration Rule — automated rules that transition or expire objects over time.
Static Website Hosting — configuring a bucket to serve content directly as a website.
Core Concepts
Buckets
A bucket is the container that holds your data in S3. Every object you store must live inside a bucket, and every bucket name must be globally unique across all of AWS. Think of a bucket as the top-level folder for a project or application's storage needs.
Objects & Upload
An object is simply a file — an image, a document, a video, a JSON file, anything — stored inside a bucket. Upload is the action of transferring that file from your local machine (or another system) into the bucket. Once uploaded, each object is identified by a unique key (essentially its path/name inside the bucket).
Storage Classes
S3 offers multiple storage classes, each designed for a different access pattern — frequently accessed data, infrequently accessed data, and long-term archival data. Choosing the right class is a balance between accessibility and cost efficiency.
Note: Exact pricing figures for each storage class were not provided in the source data, so no cost numbers are stated here. Refer to official AWS pricing pages for current rates.
Bucket Policy
A bucket policy is a JSON-based access control document attached directly to a bucket. It defines who (which AWS account, user, or role) can perform what actions (read, write, delete, etc.) on the bucket or its objects. This is the primary mechanism for controlling access at the bucket level.
ACL & Permissions
ACLs (Access Control Lists) are an older, more granular way to control access to individual buckets and objects, alongside standard permissions. While bucket policies are generally the modern, recommended approach, understanding ACLs is still useful, especially when working with legacy configurations.
Intelligent Tiering & Lifecycle Configuration Rule
Intelligent Tiering is a storage class that automatically moves objects between access tiers based on how frequently they're used — without manual intervention. This is configured through a lifecycle configuration rule, which defines automated actions on objects over time (for example, transitioning objects to a different storage class after a certain period, or expiring them altogether).
In the lab, intelligent tiering was set up specifically as a lifecycle configuration rule — meaning the automation of "move this data to a cheaper tier when it's not being accessed" is handled through S3's lifecycle rule engine.
Static Website Hosting
S3 buckets can be configured to host static websites directly — serving HTML, CSS, JS, and other static assets straight from the bucket via a website endpoint. This turns a plain storage bucket into a publicly accessible website, without needing a traditional web server.
Cloud Architecture / Structure
Based on the components covered in the lab, here's how they relate to one another inside a single S3 bucket setup:
S3 Bucket
Upload
Controls access to
Controls access to
Triggers
Moves
Serves
HTTP Request
Objects (Uploaded Files)
Bucket Policy
ACL & Permissions
Lifecycle Configuration Rule
Intelligent Tiering
Static Website Hosting
User / Client
Website Visitor
Component labels:
Objects — the files stored in the bucket.
Bucket Policy / ACL & Permissions — the two access-control layers governing who can interact with objects.
Lifecycle Configuration Rule — the automation engine that triggers storage-class transitions.
Intelligent Tiering — the storage class that lifecycle rules move eligible objects into.
Static Website Hosting — the feature that exposes bucket objects as a browsable website.
Workflow / Process
Here's the step-by-step process the lab followed, from an empty bucket to a fully configured one:
Create Bucket
Upload Objects
Set Bucket Policy
Configure ACL / Permissions
Set Lifecycle ConfigurationRule
Enable Intelligent Tiering
Enable Static WebsiteHosting
Bucket Serves ContentPublicly
Create Bucket — a globally unique bucket is created.
Upload Objects — files are added into the bucket.
Set Bucket Policy — access rules are defined at the bucket level.
Configure ACL / Permissions — finer-grained or legacy-style access control is applied.
Set Lifecycle Configuration Rule — automation rules are defined for object transitions.
Enable Intelligent Tiering — objects become eligible for automatic cost-optimized storage movement.
Enable Static Website Hosting — the bucket is exposed as a website endpoint.
Bucket Serves Content — end users/visitors can now access the hosted content.
Read original: https://dev.to/toqeer_afzal_d1e337ddf67f/hands-on-with-amazon-s3-buckets-permissions-lifecycle-rules-and-static-hosting-published-true-2g51
← Previous
I hand-rolled a PDF engine in vanilla JS so our invoice app needs zero dependencies
Next →
Bad evals, my own: five exercises from two LLM judges
Related
Google ADK Callbacks Are a Policy Plane, Not Just Hooks
General
0
DEV Community 周榜
How I Modelled My Power BI Data — Data Modelling, Relationships & Joins (Kenya Crops Dataset)
General
0
DEV Community 周榜
Don't Panic! Decoding Your First Python SyntaxError Like a Pro
General
0
DEV Community 周榜
"Day three: the loop leaves a trace"
General
0
DEV Community 周榜
Comments0
No comments yet — be the first