Wait — Folders Aren’t Really Folders in Amazon S3 bucket?
Amazon S3 (Simple Storage Service) offers a scalable, durable storage solution designed for storing objects of any size, from a few bytes to terabytes of data. Think of it as a limitless vault, ready to securely hold all your data
Amazon S3 is a cloud storage service, while a S3 bucket is a container for storing objects in S3
Why is S3 an “Object” Storage?
Amazon S3 doesn’t use real folders — it’s a flat storage system where each object has a unique key, and the ‘folder’ structure is just an illusion created by slashes (/
) in the key names!
Yes, you read that right-no folders! S3 stands out because of its flat storage model. This means S3 doesn’t use a traditional folder or block storage system.
- No Hierarchical Structure: Unlike typical file systems (which have folders) or block storage (which can be mounted), S3’s storage is flat
- Every Object Has a Unique Key: In S3, each object is assigned a unique key, often appearing like a file path, such as
/folder_name/image.jpeg
. While it may look likefolder_name
is a real directory, it's just a visual aid. S3 doesn't use actual folders or directories. - Using Delimiters for Visual Structure: The forward slash (
/
) acts as a delimiter to create the appearance of folders. For example,folder_name/image.jpeg
looks like an image inside a folder, but it's stored as a single, unique key.
Important Facts About S3
S3 brings several unique advantages, from global naming requirements to flexible replication options.
Bucket Naming Rules
- Globally Unique: Each bucket name in S3 must be globally unique, so once a name is claimed, it’s unavailable across all of AWS.
- Character Requirements: Bucket names must be between 3–63 characters, all lowercase, with no underscores. Names must begin with a lowercase letter or number.
Region-Specific Storage with Cross-Region Replication
- Single Region by Default: By default, each S3 bucket exists in a specific AWS region.
- Cross-Region Replication: For added resilience, S3 allows you to set up cross-region replication.
- Example: If you create a bucket in
us-west-1
(United States), you can configure it to replicate toeu-central-1
(Germany). This setup allows automatic replication of objects to a backup location, protecting against regional failures.
S3 Storage Limits: Soft and Hard
- Soft Limit (Adjustable): Each account has a default limit of 100 buckets. This limit is adjustable upon request to AWS, so if you need more, you can increase it.
- Hard Limit (Fixed): The maximum number of buckets per AWS account is 1,000. This limit cannot be exceeded, even with a request.