Amazon S3 for Beginners: Buckets, Objects, Storage Classes, Versioning, Permissions and Static Website Hosting

AWS Technical Essentials 55 min min read Updated: Nov 17, 2026 Beginner
Amazon S3 for Beginners: Buckets, Objects, Storage Classes, Versioning, Permissions and Static Website Hosting
Beginner Topic 1 of 3

What Is S3?

Amazon Simple Storage Service (S3) is object storage: you store files (objects) in buckets and get them back over the internet or the AWS network. It is built for 11 nines (99.999999999 percent) durability, which means your data is extremely unlikely to be lost.

  • Store photos, videos, backups, logs, website files, data lakes, software downloads
  • Unlimited total storage. One object can be up to 5 TB
  • You pay for storage used, requests and data transferred out
  • S3 is Regional: your data stays in the Region you choose, copied across multiple AZs

Buckets and Objects

TermMeaning
BucketContainer for objects. Name must be globally unique, lowercase, 3-63 characters
ObjectThe file (data) plus metadata
KeyThe object's full name, like photos/2026/trip.jpg. S3 looks flat. The slashes are just part of the name (shown as folders in the console)
PrefixThe beginning of a key, like photos/2026/, used to group and filter
Version IDIdentifies one version when versioning is on

Your First Bucket

bash aws s3 mb s3://my-demo-bucket-111111111111-ap-south-1 --region ap-south-1 echo "hello s3" > hello.txt aws s3 cp hello.txt s3://my-demo-bucket-111111111111-ap-south-1/docs/hello.txt aws s3 ls s3://my-demo-bucket-111111111111-ap-south-1/ --recursive aws s3 sync ./site s3://my-demo-bucket-111111111111-ap-south-1/site --delete aws s3 cp s3://my-demo-bucket-111111111111-ap-south-1/docs/hello.txt ./copy.txt aws s3 rm s3://my-demo-bucket-111111111111-ap-south-1/docs/hello.txt

Storage Classes

ClassUseRetrieval
S3 StandardFrequently used dataInstant
S3 Intelligent-TieringUnknown or changing access. S3 moves data automaticallyInstant (with automatic archive tiers optional)
S3 Standard-IA (Infrequent Access)Backups and data you read rarely but need fast. Retrieval feeInstant
S3 One Zone-IARe-creatable infrequent data in a single AZ (cheaper, less resilient)Instant
S3 Glacier Instant RetrievalArchive you read about once a quarterMilliseconds
S3 Glacier Flexible RetrievalArchive, free bulk retrievalMinutes to hours
S3 Glacier Deep ArchiveCheapest, long-term retention (years)Hours (12 or more)
  • Lifecycle rules automatically move or delete objects: for example 'after 30 days move to Standard-IA, after 90 days to Glacier, after 365 days delete'
  • Archive classes have minimum storage durations, so do not use them for short-lived data
json {"Rules":[{"ID":"logs-tiering","Status":"Enabled","Filter":{"Prefix":"logs/"}, "Transitions":[{"Days":30,"StorageClass":"STANDARD_IA"},{"Days":90,"StorageClass":"GLACIER"}], "Expiration":{"Days":365},"AbortIncompleteMultipartUpload":{"DaysAfterInitiation":7}}]}

Versioning

  • Keeps every version of an object. Overwrites create a new version. A delete adds a delete marker so you can recover
  • Turn it on for important buckets. Once enabled it can be suspended, not removed
  • Old versions cost storage, so add a lifecycle rule for old versions
bash aws s3api put-bucket-versioning --bucket my-demo-bucket-111111111111-ap-south-1 --versioning-configuration Status=Enabled aws s3api list-object-versions --bucket my-demo-bucket-111111111111-ap-south-1 --prefix docs/hello.txt

Security and Access

ControlWhat it does
Block Public AccessFour switches that stop buckets from becoming public. Keep ON (also at account level)
IAM policiesGive users and roles permission
Bucket policyResource policy on the bucket. For cross-account access, conditions (IP, VPC endpoint, HTTPS only)
ACLsOld method. Use Bucket owner enforced to turn ACLs off
EncryptionSSE-S3 is automatic for all new objects. SSE-KMS for key control and audit
Presigned URLA temporary link to download or upload one object without giving permissions
Access PointsDifferent entry points with their own policy for teams
MFA Delete / Object LockExtra protection against deletion (WORM)
bash aws s3api put-public-access-block --bucket my-demo-bucket-111111111111-ap-south-1 \ --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true aws s3 presign s3://my-demo-bucket-111111111111-ap-south-1/docs/hello.txt --expires-in 600
Most data leaks come from public buckets Keep Block Public Access on. Share files with presigned URLs or CloudFront instead of making the bucket public.

Static Website Hosting

S3 can serve a static website (HTML, CSS, JavaScript, images). Best practice today: keep the bucket private and serve it through CloudFront with Origin Access Control, which also gives HTTPS and a custom domain.

bash aws s3 website s3://my-site-bucket --index-document index.html --error-document error.html # simple test mode (public website endpoint) aws s3 sync ./site s3://my-site-bucket --delete

Other Useful Features

  • Replication (cross-Region and same-Region) copies new objects automatically
  • Event notifications trigger Lambda, SQS or SNS when objects arrive
  • Transfer Acceleration speeds uploads from faraway users
  • Multipart upload splits big files (use for objects over 100 MB)
  • S3 Inventory and Storage Lens show what you store
  • S3 Select / Athena query data in place
  • Requester Pays makes the downloader pay the transfer cost

Pricing in Simple Words

You pay forNotes
Storage (GB per month)Depends on class and Region
Requests (PUT, GET, LIST...)Per thousand requests
Data transfer out to the internetData in is free. Transfer to CloudFront and within the same Region to AWS services is cheaper or free in many cases
Retrieval and transitionsFor IA and Glacier classes

Practice

  1. Create a bucket, upload a file and download it
  2. Turn on versioning, overwrite the file and list versions
  3. Add a lifecycle rule for a logs/ prefix
  4. Create a presigned URL that expires in 5 minutes
  5. Host a one-page website using CloudFront and a private bucket

Conclusion

S3 stores unlimited objects in buckets with very high durability. Choose the right storage class and lifecycle rules, enable versioning and encryption, keep Block Public Access on, share with presigned URLs, and use CloudFront in front of static sites.

Quick Summary: S3; buckets and objects; first bucket; classes; versioning; security; website; features; pricing.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators