> For the complete documentation index, see [llms.txt](https://amartyushov.gitbook.io/tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amartyushov.gitbook.io/tech/platforms/aws/s3.md).

# S3

## S3 (Storage)

Storage platform. Unlimited storage "bucket". [PRICING](https://aws.amazon.com/s3/pricing/)

* long term storage
* mass storage

Select the region for the bucket which is closest to data consumers => increase a speed.

* Bucket
  * Folder
    * Object

### S3 naming conventions:

* Bucket names must be unique across **all AWS accounts**
* 3-63 chars length, lowercase, numbers and hyphen
* name **must not** be formatted as  IP address (192.168.2.5)

### Storage classes

This is a classification assigned to **each Object** in S3

* Standard
  * most expensive class
  * general all-purpose storage
  * default storage option
  * 99.999999999 object durability (eleven nines)
  * 99.99% object availability

* Standard Infrequent Access (Standard\_IA)
  * designed for objects that you do not access frequently, but must be immediately available when accessed
  * eleven nines object durability
  * 99.90% object availability
  * less expensive than Standard

* One Zone Infrequent Access (OneZone\_IA)
  * Designed for non-critical, reproducible objects
  * eleven nines object durability in a single Availability zone
  * 99.5% object availability
  * less expensive than two above

* Glacier&#x20;
  * long term archival storage&#x20;
  * may take several hours for objects to be retrieved
  * eleven nines object durability
  * cheapest (very low cost)

* Object Durability
  * % that the file will not be lost in a year

* Object Availability
  * % that the file will be accessible over a year

### Object lifecycle

This is a set of rules which may automatically change storage class for the Object

![](https://415484505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LxtoAXZwwOc4XGto8vb%2F-M9cHNT1LPDv46o9r_XP%2F-M9cJAFY35-fQT3B-m_Z%2FScreen%20Shot%202020-06-12%20at%2013.35.41.png?alt=media\&token=649b7053-ee6c-4c9c-8ca5-fab1f8d21fb7)

### S3 permissions

Permissions to view, access and use specific buckets and objects.

### Object versioning

* Keeps track and stores all versions of an object => you can access an older version
* Versioning is either ON or OFF
* if (ON) => you can only suspend versioning. It cannot be OFF.
  * suspended versioning: you prevent only versioning going forward
  * all previous versions are remain in the storage
  * versioning can only be set to the bucket level => applies to all objects in the bucket
