Amazon S3 architecture
Codemia Knowledge Hub ·
Amazon Simple Storage Service (Amazon S3) is object storage, not a file system or block storage. Its architecture rests on buckets that hold objects, keys that identify those objects, Regions that decide where data lives, and access controls that decide who can reach it. It was designed with a minimal feature set to make web-scale computing easier for developers.
Core components
- Buckets: A bucket is a container for objects, and every object lives in one. Buckets are the basic unit of organization in S3 and set the scope of controls such as permissions and geographic storage settings.
- Objects: An object is the fundamental entity stored in S3. It consists of data and metadata. The data is opaque to S3, while the metadata is a set of name-value pairs describing the object, either predefined or user-defined.
- Keys: Each object has a key that uniquely identifies it within its bucket. Bucket, key and version ID together uniquely identify every object.
- Regions: S3 is hosted in geographic locations around the world, made up of Regions and Availability Zones, which determine where data resides.
- Access control: Objects can be private or public. Permissions can be set on individual objects or through bucket policies.
Object size and operations
Objects can be up to 5 terabytes, with metadata up to 2 kilobytes. The main operations are PUT (upload), GET (retrieve or download), DELETE (remove) and LIST (list available buckets), each with its own configuration options.
Durability, availability and scale
S3 is designed for 99.999999999% (11 nines) durability and 99.99% availability of objects over a given year. It achieves this by replicating data across multiple servers in Amazon's data centers, and it is built to handle large amounts of traffic and data.
Security and compliance
S3 encrypts data in transit and at rest. You can manage your own encryption keys or use keys provided by S3. S3 also supports a number of compliance certifications for regulated data.
Pricing
You pay for what you use: storage consumed, number of requests and data transfer.
Uploading a file with Boto3
To store user-generated content such as photos and videos, you can upload a file to a bucket with Python and Boto3. Note that this example is configured for DigitalOcean Spaces, an S3-compatible service, through endpoint_url. For Amazon S3 itself you would use an AWS Region and drop the custom endpoint.
Components at a glance
| Feature | Description | Example Value |
| Buckets | Containers for storage | "photos-2022" |
| Objects | Items stored in buckets | "vacation.jpg" |
| Keys | Unique identifier for each object | "vacation.jpg" |
| Regions | Geographic area data is stored | "US-West" |
| Access Control | Permissions for accessing data | Public/private, user-based rules |
Amazon provides documentation, SDKs for popular languages and a community forum, which cover advanced features such as lifecycle policies and cross-origin resource sharing (CORS).
Related reading
- Amazon S3 boto - how to delete folder?
- Amazon S3 Bucket Policy Public Access Denied
- Amazon S3 bucket returning 403 Forbidden
- Amazon S3 Change file download name
- Amazon S3 copyObject permission
- Amazon S3 direct file upload from client browser - private key disclosure
- Amazon S3 exception The specified key does not exist
- Amazon S3 files access policy based on IP Address
System design interview problems on this topic
- Design Dropbox: solution and walkthrough
- Design a Global Content Distribution Network: solution and walkthrough
- Design a Serverless Architecture Framework: solution and walkthrough
- Design Youtube or Netflix: solution and walkthrough

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseSystem Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.