Skip to main content

Amazon S3

Amazon Simple Storage Service (S3) is object storage built to store and retrieve any amount of data from anywhere. It's one of AWS's oldest and most reliable services, forming the backbone of countless applications.

Key Concepts

  • Buckets: Containers for objects (globally unique names)
  • Objects: Files and their metadata (up to 5 TB each)
  • Keys: Unique identifiers for objects within a bucket
  • Prefixes: Folder-like organisation (though S3 is flat)

Storage Classes

ClassUse CaseRetrieval
StandardFrequently accessed dataImmediate
Intelligent-TieringUnpredictable access patternsAutomatic
Standard-IAInfrequent accessImmediate
One Zone-IANon-critical infrequent dataImmediate
Glacier InstantArchive with instant accessMilliseconds
Glacier FlexibleLong-term archiveMinutes to hours
Glacier Deep ArchiveColdest data12-48 hours

Common Use Cases

  • Static website hosting: Serve HTML, CSS, JS via CloudFront
  • Data lake: Store raw data for Athena or analytics
  • Backup and archive: Durable, cost-effective storage
  • Application assets: Images, videos, documents
  • Log storage: Application and access logs

What We Like

  • Durability: 99.999999999% (11 9s) durability
  • Availability: 99.99% with Standard class
  • Scalability: No limits on storage or throughput
  • Versatility: Works for nearly any storage use case
  • Integration: Native support across all AWS services

What We Don't Like

  • Consistency model: Strong consistency is now default, but old habits die hard
  • Cost complexity: Multiple dimensions (storage, requests, transfer)
  • Bucket naming: Global uniqueness requirement can be frustrating
  • No append: Objects are immutable; must rewrite entirely

Security Best Practices

  1. Block public access by default at the account level
  2. Use bucket policies for access control
  3. Enable versioning for critical data
  4. Enable encryption (SSE-S3, SSE-KMS, or client-side)
  5. Enable access logging for audit trails
  6. Use VPC endpoints to keep traffic private