Buckets
- What They Are: Buckets are containers in S3 where you store data.
- Purpose: Organizes and manages the data (files or objects) in your S3 storage.
- Naming: Bucket names must be globally unique across all of AWS, as they serve as a top-level namespace for data within S3.
- Permissions: You can control access to buckets through permissions, managing who can read, write, or delete data.
- Regions: When creating a bucket, you select an AWS Region, which determines where data is stored physically. Choosing the right region can optimize access and cost.
- Versioning: Enables you to store multiple versions of the same object, which is helpful for backups and recovering from accidental deletions or changes.
Objects
- What They Are: Objects are the actual files you store in S3 buckets.
- Structure: Each object consists of data, metadata, and a unique identifier (key).
- Key: This is the unique name given to the object within a bucket (often including file paths).
- Metadata: Provides additional information about the object, like file type, encryption settings, or custom data.
- Access Control: You can set permissions on individual objects, controlling who can access or manipulate each object within the bucket.
- Storage Classes: S3 offers different storage classes for objects, from frequent access (e.g., Standard) to archive storage (e.g., Glacier). Storage classes allow cost optimization based on data access patterns.
How Buckets and Objects Work Together
- Each bucket can store an unlimited number of objects, and you can organize data within the bucket using folder-like prefixes.
- Buckets serve as the top-level container, while objects are the individual data files with specific access rules and metadata.
- Objects within buckets can be accessed via URLs or APIs, where the bucket and object key form part of the URL.