Amazon S3 Deep Dive: Buckets, Storage Classes, Versioning, Lifecycle, Replication, Security and Performance

AWS Solutions Architect 55 min min read Updated: Nov 17, 2026 Intermediate
Amazon S3 Deep Dive: Buckets, Storage Classes, Versioning, Lifecycle, Replication, Security and Performance
Intermediate Topic 1 of 3

What Is S3?

Amazon Simple Storage Service (S3) is object storage: store any amount of files (objects) in containers called buckets, access them over HTTPS, and pay for what you store and transfer. S3 gives 11 nines (99.999999999 percent) durability and is built for very high availability.

ConceptDetails
BucketA container with a globally unique name, created in one Region. Data stays in that Region unless you replicate it
ObjectA file plus metadata. Identified by key (full path name like reports/2026/jan.csv). Max size 5 TB; single upload via PUT up to 5 GB, use multipart above 100 MB
PrefixFolders are only a naming convention. S3 is flat
ConsistencyStrong read-after-write consistency for all operations
LimitsUnlimited objects. 100 buckets per account by default (can be increased)
bash aws s3 mb s3://acme-data-prod-ap-south-1 --region ap-south-1 aws s3 cp report.csv s3://acme-data-prod-ap-south-1/reports/2026/report.csv aws s3 sync ./site s3://acme-site --delete aws s3 ls s3://acme-data-prod-ap-south-1/reports/ --recursive --human-readable --summarize aws s3 presign s3://acme-data-prod-ap-south-1/reports/2026/report.csv --expires-in 900 aws s3api put-bucket-versioning --bucket acme-data-prod-ap-south-1 --versioning-configuration Status=Enabled

Storage Classes

ClassUse forRetrievalMin storageAZs
S3 StandardFrequently accessed data, websites, analyticsImmediateNone3+
S3 Intelligent-TieringUnknown or changing access patterns: moves objects between tiers automaticallyImmediate (plus optional archive tiers)None (small monitoring fee per object)3+
S3 Standard-IA (Infrequent Access)Long-lived data accessed rarely but needed fast (backups)Immediate, retrieval fee30 days, 128 KB3+
S3 One Zone-IARe-creatable infrequent data (secondary copies)Immediate, retrieval fee30 days, 128 KB1 (lost if the AZ is lost)
S3 Express One ZoneSingle-digit millisecond latency for the most latency-sensitive apps, ML trainingImmediateNone1 (directory bucket)
S3 Glacier Instant RetrievalArchive accessed about once per quarter, needs millisecondsMilliseconds90 days3+
S3 Glacier Flexible RetrievalArchive, retrieval in minutes to hoursExpedited 1-5 min, Standard 3-5 h, Bulk 5-12 h90 days3+
S3 Glacier Deep ArchiveCheapest, long-term retention (7-10+ years), rare accessStandard 12 h, Bulk 48 h180 days3+
Memory trick: Hotter = more expensive to store, cheaper to read. Colder = cheaper to store, retrieval fee and delay. Unknown pattern → Intelligent-Tiering.

Versioning

  • Keeps every version of an object. Delete adds a delete marker, the old versions stay and can be restored
  • Protects against accidental delete and overwrite
  • Once enabled it can only be suspended, not removed
  • MFA Delete requires MFA to permanently delete versions or change versioning (set by the root user)
  • Old versions cost money: use lifecycle rules to expire them

Lifecycle Rules

json { "Rules": [{ "ID": "tier-and-expire", "Status": "Enabled", "Filter": {"Prefix": "logs/"}, "Transitions": [ {"Days": 30, "StorageClass": "STANDARD_IA"}, {"Days": 90, "StorageClass": "GLACIER"}, {"Days": 365, "StorageClass": "DEEP_ARCHIVE"} ], "Expiration": {"Days": 2555}, "NoncurrentVersionExpiration": {"NoncurrentDays": 60}, "AbortIncompleteMultipartUpload": {"DaysAfterInitiation": 7} }] }
bash aws s3api put-bucket-lifecycle-configuration --bucket acme-logs --lifecycle-configuration file://lifecycle.jso
  • Transitions move to colder classes. Only in one direction (Standard → IA → Glacier ...)
  • Expiration deletes objects (and noncurrent versions)
  • Always add **AbortIncompleteMultipartUpload** to avoid paying for unfinished uploads

Replication

TypeUse
CRR (Cross-Region Replication)Disaster recovery, lower latency for far users, compliance copies in another Region
SRR (Same-Region Replication)Aggregate logs, copy between prod and test accounts, keep a replica for sovereignty
  • Versioning must be enabled on source and destination buckets
  • Needs an IAM role for S3 to replicate
  • Replicates new objects after the rule is created. Use S3 Batch Replication for existing objects
  • Delete markers are not replicated by default
  • Replication Time Control (RTC) gives a 15-minute SLA for 99.99 percent of objects
  • Can replicate to a different storage class and different account

Security

ControlWhat it does
Block Public AccessAccount and bucket switches that override ACLs and policies that would make data public. Keep all four ON unless you truly host public content (and even then prefer CloudFront with OAC)
Bucket policyResource-based JSON policy: cross-account access, require HTTPS, require encryption, limit to a VPC endpoint or IP
IAM policiesIdentity-based permissions for users and roles
ACLsLegacy. Disable them with Bucket owner enforced (Object Ownership)
S3 Access PointsNamed endpoints with their own policy for different applications or teams
EncryptionSSE-S3 by default; SSE-KMS for audit and control
Access logging and CloudTrail data eventsRecord who accessed objects
MacieFinds sensitive data (PII) in buckets
json { "Version": "2012-10-17", "Statement": [ {"Sid": "DenyInsecureTransport", "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": ["arn:aws:s3:::acme-data-prod-ap-south-1", "arn:aws:s3:::acme-data-prod-ap-south-1/*"], "Condition": {"Bool": {"aws:SecureTransport": "false"}}}, {"Sid": "AllowOnlyFromOurVpcEndpoint", "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": ["arn:aws:s3:::acme-data-prod-ap-south-1", "arn:aws:s3:::acme-data-prod-ap-south-1/*"], "Condition": {"StringNotEquals": {"aws:SourceVpce": "vpce-0abc1234"}}} ] }
bash aws s3api put-public-access-block --bucket acme-data-prod-ap-south-1 --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true aws s3api put-bucket-ownership-controls --bucket acme-data-prod-ap-south-1 --ownership-controls 'Rules=[{ObjectOwnership=BucketOwnerEnforced}]'

Presigned URLs

A presigned URL gives temporary access to one object without making the bucket public. It is signed with the credentials of the creator and expires (up to 7 days with long-term keys, shorter with temporary credentials).

python import boto3 s3 = boto3.client("s3") url = s3.generate_presigned_url("get_object", Params={"Bucket": "acme-data-prod-ap-south-1", "Key": "reports/2026/report.csv"}, ExpiresIn=900) upload = s3.generate_presigned_post("acme-uploads", "user-42/${filename}", ExpiresIn=600) # let browsers upload directly

Events, Hosting and Object Lock

  • Event notifications to Lambda, SQS, SNS or EventBridge on object created or removed. EventBridge adds filtering and many targets
  • Static website hosting: HTTP only from the S3 website endpoint. For HTTPS, custom domains and global speed put CloudFront in front with Origin Access Control (OAC) and keep the bucket private
  • Object Lock (WORM: write once read many): Governance mode (privileged users can override) and Compliance mode (nobody, not even root, until retention ends), plus legal hold. Requires versioning
  • S3 Inventory (daily or weekly list of objects), S3 Storage Lens (usage and activity dashboard), S3 Batch Operations (run actions on billions of objects)
  • S3 Select / Athena query data in place

Performance

  • S3 scales to at least 3,500 PUT/COPY/POST/DELETE and 5,500 GET/HEAD requests per second per prefix. More prefixes mean more throughput
  • Multipart upload for big files (parallel parts, retry a failed part). Recommended above 100 MB, required above 5 GB
  • S3 Transfer Acceleration uses CloudFront edge locations for fast uploads over long distances (bucket.s3-accelerate.amazonaws.com)
  • Byte-range fetches to download parts in parallel or read headers
  • Use CloudFront to cache popular objects close to users
  • Compress and use bigger objects or columnar formats (Parquet) for analytics

Pricing Components

You pay forNotes
Storage per GB-monthBy storage class
RequestsPUT, GET, LIST, lifecycle transitions
Data transfer out to the internet and between RegionsData in is free. Transfer to CloudFront and within the same Region to EC2 is free
Retrieval fees and minimum chargesFor IA and Glacier classes
Management featuresInventory, Storage Lens advanced, replication RTC, KMS requests
Requester pays: A bucket can be set so the requester pays the request and transfer cost, useful for sharing big public datasets.

Common Design Patterns

NeedPattern
Private files for users in an appPrivate bucket, app creates presigned URLs
Static websiteS3 + CloudFront (OAC) + ACM certificate + Route 53
Data lakeS3 + Glue Data Catalog + Athena + Lake Formation
Backups with long retentionLifecycle to Glacier / Deep Archive, Object Lock
Disaster recoveryVersioning + CRR to another Region
Big file upload from browsers/mobilePresigned multipart or Transfer Acceleration

Practice Tasks

  1. Create a bucket, enable versioning, upload a file twice and list versions, then delete and restore
  2. Add a lifecycle rule that moves logs/ to Standard-IA after 30 days and expires after one year
  3. Set up CRR to a bucket in another Region and test with a new object
  4. Write a bucket policy that denies non-HTTPS requests
  5. Host a static site with S3 and CloudFront using OAC and a private bucket

Conclusion

S3 is durable, scalable object storage. Choose a storage class by access pattern, use versioning, lifecycle and replication for protection and cost, keep Block Public Access on, control access with policies and presigned URLs, and put CloudFront in front for websites and global performance.

Quick Summary: buckets/objects; storage class table; versioning/MFA delete; lifecycle JSON; CRR vs SRR; security controls + policy examples; presigned; Object Lock; performance; pricing; patterns.

Get Newsletter

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