Objects in S3 π β
Alright noob, youβve got your shiny new bucket πͺ£.
But an empty bucket is boring β time to put stuff inside it!
That βstuffβ is called an Object in S3.
What is an Object? π€ β
- An object = a single file you store in S3.
- Each object includes:
- The actual data (file content)
- A key (the file name + path)
- Metadata (extra info about the file, like tags or type)
Example:
- Object Key:
catpics/cute-fluffy.png
- Metadata:
Content-Type: image/png
- Data: π± β your cat meme
Keys: The Fancy Names π β
- An objectβs key is like its full path.
- Example:
project1/docs/resume.pdf
- S3 pretends these are folders, but theyβre actually part of the key.
Think of it as:
Object Key = GPS coordinates for your file in the cloud π
Metadata: The Secret Sauce π β
Every object has metadata = info about the file.
Types of metadata:
- System metadata β managed by AWS (like file size, last modified date)
- User metadata β you can add custom tags (like
Owner: Kahnu
,Project: DeveloperNoob
)
Object Size Rules π β
- Minimum: 0 bytes (yes, you can store an empty file π€·ββοΈ)
- Maximum: 5 TB (yep, terabytes β store a whole Netflix series if you want πΊ)
- Upload limit per request: 5 GB, but for bigger files use multipart upload.
Managing Objects π οΈ β
You can:
- Upload β from AWS Console, CLI, or SDKs
- Download β grab files back to your machine
- Delete β yeet the file into oblivion ποΈ
- Share β generate a public URL (careful: donβt leak secrets π€)
Example: Uploading a Meme π β
- Open bucket:
kahnu-memes
- Upload file:
spiderman-pointing.jpg
- Object Key:
memes/spiderman-pointing.jpg
- Share URL with friends: