Objects, blocks and files
| Type | How you access it | Common use |
|---|---|---|
| Object | A complete object using its key through an API | Images, backups and static website files |
| Block | Blocks on a disk attached to a computer | VM disks and databases |
| File | Shared files and folders using a file protocol | Shared team folders |
What is a bucket?
A bucket is a container for objects. Each object has a key, its data and metadata. A key such as topics/storage/index.html identifies an object. In object storage, the slashes form a prefix rather than a traditional disk directory.
The homepage is index.html. A lesson is topics/storage/index.html. Styles are in assets/style.css. Each file becomes a separate object when uploaded to a bucket.
Why it works for a static website
HTML, CSS and JavaScript files can be delivered to a browser as stored objects. JavaScript can still run inside the browser. The site does not require application code running on a server to generate its pages.
Check your understanding: is object storage the same as a VM disk?
No. Object storage exposes objects through an API. Block storage exposes a disk that an operating system can format with a file system.