Amazon S3 Flashcards
What are objects in S3?
Objects in S3 are file-like entities that contain data. They represent data and not infrastructure, which is what S3 buckets are.
Objects are stored in buckets.
What is S3 (Simple Storage Service)?
S3 is an object-based storage service that is kind of unlimited and serverless, meaning the underlying infrastructure is managed by AWS. The S3 Console provides an interface to upload or access data.
What does an S3 object consist of?
An S3 object may consist of:
Key: name of the object
Value: data stored
Version ID: version of the object (if versioning is enabled)
Metadata: additional information
What are Etags in S3?
Etags are entity tags used for detecting whether a change to a file has been made without downloading. They can also be used for checking data integrity and are typically represented by an MD5 hash.
When are Etags returned in S3?
Etags are returned on:
PUT: upload, including multipart or copy
GET: download, list (ETag is not included in the response body when listing objects)
HEAD: fetching metadata without downloading the file
How can Etags be used in combination with conditional requests?
Etags can be used for caching with If-None-Match and for synchronization with If-Match.
What is the purpose of checksums in S3?
Checksums are used to ensure the data hasn’t become corrupted in transit.
What are S3 Object prefixes?
S3 Object prefixes are part of the object key name. They help organize, group, and filter data.
What are S3 buckets?
Buckets hold objects or folders (which are not true folders) that store objects. Each bucket must have a unique name, is region-specific, and represents infrastructure.
What are the key rules for S3 bucket naming?
- Length: 3-63 characters long
- Characters: lowercase letters, numbers, dots (.), and hyphens (-)
- Start and End: must begin and end with a letter or number
- No adjacent periods
- Cannot be formatted as IP addresses
- No uppercase letters, underscores, spaces, or special characters like “@” or “$”
What are the S3 bucket restrictions and limitations?
- Up to 100 buckets, 1000 after a service request
- Buckets must be empty before deletion
- No max bucket size or limit to the number of objects
- Files must be between 0 and 5 TBs (multipart upload recommended for files over 100MB)
- Specific limits for S3 on AWS Outposts
What are the two types of S3 buckets?
Hallmarks in comparison.
- General Purpose: flat hierarchy, all storage classes except S3 Express One Zone, recommended for most use cases, no prefix limits, 100 per account
- Directory: folder hierarchy, only S3 Express One Zone storage type, recommended for single-digit millisecond performance on PUT and GET, no prefix limits, 10 per account
What are the characteristics of S3 general purpose bucket folders?
- Do not have true folders
- Creating a folder creates a zero-byte object ending in a forward slash (e.g., myfolder/)
- Files in a folder have names appended with the folder prefix
What is unique about S3 folders?
- They are S3 objects and not independent entities
- Do not include permissions or metadata
- Can’t be empty or full
- Aren’t moved; objects with the same prefix are renamed when moved
What happens to the prefix when moving an S3 object to another folder?
Only the prefix is changed; the object itself is not physically moved.
What is metadata in S3?
Metadata provides information about other data but not the content itself. It is useful for categorizing, organizing data, and providing context about data.
When can we attach metadata to S3 Objects?
Metadata can be attached to S3 Objects at any time.
What are the types of metadata in S3?
Metadata can be either system-defined or user-defined.
Who sets system-defined metadata in S3?
System-defined metadata is set by Amazon (with some exceptions).
How must user-defined metadata be formatted in S3?
User-defined metadata must begin with “x-amz-meta-“. When using the AWS CLI, it should be set as “key=value”, which will automatically be appended with the “x-amz-meta-“ prefix.
What does WORM stand for and what does it mean?
WORM stands for Write Once Read Many, meaning the data is immutable and cannot be modified or deleted.
What is Object Lock in S3?
Object Lock prevents deletions of objects in a bucket. It can only be enabled on bucket creation and is useful for data integrity and regulatory compliance.
What are the two types of retention in Object Lock?
Retention period: fixed time
Legal hold: until removed
What are the two request styles in S3?
Virtual hosted-style requests: the bucket name is a subdomain on the host.
Path-style requests: the bucket name is in the request path.