Data in S3 is organized using a flat structure with buckets as top-level containers, where each object is identified by a unique key, and logical hierarchy is created through key name prefixes and delimiters like forward slashes.
Amazon S3 uses a fundamentally flat data model for storage, but provides powerful mechanisms to organize data logically. At the top level, you create buckets which serve as containers for your objects. Within these buckets, each object is identified by a unique key (essentially the full path and filename). While there are no actual folders or subdirectories in the underlying storage, you can create a logical hierarchy using key name prefixes and delimiters to organize objects in a familiar folder-like structure .
Buckets: The top-level containers for all data stored in S3. Each bucket name must be globally unique across all AWS accounts and exist within a specific AWS Region .
Objects and Keys: Each object is uniquely identified within a bucket by a key name. The key is a sequence of Unicode characters with UTF-8 encoding up to 1,024 bytes long, and serves as the complete identifier for retrieving the object .
Prefixes: Strings at the beginning of object key names used to group related objects. For example, keys like 'photos/vacation/image.jpg' use 'photos/vacation/' as a prefix to group vacation photos together .
Delimiters: Characters (commonly forward slash '/') that help organize objects hierarchically. When listing objects, you can specify a delimiter to roll up all keys sharing a common prefix into a single summary result .
The S3 console enhances this organizational model by visually representing prefixes as folders. When you create a folder in the console, it actually creates a zero-byte object with the folder name as the key, which helps maintain the folder illusion. Behind the scenes, you can also add additional organization through object tags (up to 10 key-value pairs per object) for more flexible categorization, access control, and lifecycle management .
Object Tags: Up to 10 key-value pairs per object that can be created, updated, and deleted throughout an object's lifecycle. Useful for fine-grained access control (ABAC) and lifecycle rule management .
Object Metadata: User-defined metadata stored as key-value pairs within the object. Limited to 2KB total size (including both keys and values) and all keys are converted to lowercase .
S3 Inventory: Reports that list objects and their metadata, tags, and encryption status, configurable on a daily or weekly basis for comprehensive tracking .
S3 Metadata: A newer feature that delivers queryable object metadata in near real-time for accelerated data discovery, storing information in Apache Iceberg tables .