# Buckets and Objects

## Buckets:

* I like to think of them as directories which can contain files in them and the files are known as "Objects" and **directories are known as "Buckets"**.<br>
* **Bucket name must be unique across the whole world** and it can't have uppercases or underscores, etc.<br>
* Buckets **need to be defined at which region they are**, so **buckets are a regional thing**.<br>
* You **can configure the bucket for website hosting** and host a static file on S3 if you upload the website files. To access the website, **you're bucket must be public otherwise you get a 403 (Forbidden) error.**<br>
* Can **enable versioning to create multiple versions of your file, to protect against accidental deletes and to roll back to a previous version of a file.**<br>
* You can **use S3 access logs to log all the access to S3 buckets and objects**, so you can see causes of issues and any suspicious activity.<br>
* Can't change its region or name after creation.<br>
* Can't have buckets within buckets.

## Objects:

* **Consists of a file and some metadata that describes the file.**<br>
* **Key is the full file path; it identifies the object within a bucket**.<br>
* Max size for an object is 5TB (this isn't needed for the exam but it's just a good fact to know).
