DEV Community

Cover image for Amazon S3 Basics
techD
techD

Posted on

Amazon S3 Basics

Amazon S3 is their Simple Storage Service. It is an economical, scalable and resilient service used to store large amounts of data. The storage platform is global and exists in the AWS Public Zone. Resiliency is in the ability to be replicated across not only Availability Zones (one or more discrete data centers with physical security as well as redundant power, networking and connectivity), but regions (physical location around the world with a cluster of Data Centers) as well. It is accessible via the Command Line Interface, the AWS UI, using an API or even via HTTP/HTTPS.

S3 stores data (called 'objects') in a container called a Bucket. Conceptually speaking, an 'object' is like a file. Objects have a 0-byte to 5 Terabyte size limit, and you have an unlimited number of objects. You can use Amazon S3 as a Data Lake, or to store large volumes of Media Files--audio, video, photos, or for a myriad of other purposes. Objects consist of a Key (name), and a Value (data) plus other information such as Version ID, Metadata, Access Controls or Subresources.

An S3 Bucket is a container for an Object. Buckets are created in a specific region and they never leave their primary home region. This makes buckets stable and also enables you to control Data Sovereignty. Any failure is contained within a Region. A Bucket has a capacity of 0 to unlimited objects. They have no structure; all data (objects) are stored at the root level; however the UI will present what appear to be 'folders', but are really just a pointer (called a 'prefix') to the object and are part of the object name (ex: /dave/elephant.jpg or /sam/description.txt). There is also no concept of a file type.

Bucket names must be Globally unique--meaning that you cannot have a generic bucket name like 'Video' if it exists anywhere within AWS in any region in any account. Buckets are also where a lot of permissions and options are set as well.A bucket name must start with a lowercase letter or number, and can only consist of lowercase letters or numbers. They cannot be formatted like an IP address (1.1.1.1) and must be between 3–63 characters in length. There is a soft limit of 100 buckets per AWS Account--over 100 will require a support request to AWS, and a hard limit of 1,000 per account. This means a large organization may have to create one or more buckets
and use prefixes to organize their data among users.

Other capabilities of S3 include:

  • Object Versioning, which is a feature that allows you to keep multiple versions of an object in the same bucket. This is useful for applications that require a rollback or recovery of data.
  • MFA Delete, which is a feature that requires you to provide a Multi-Factor Authentication (MFA) device to delete an object version. This is useful for applications that require a rollback or recovery of data.
  • Object Storage Classes, which are features that allow you to store objects in different storage classes. This is useful for applications that require a rollback or recovery of data.
    • Standard Storage Class, which is the default storage class for objects.
    • Standard Infrequent Access (SIA) Storage Class, which is a storage class for objects that are accessed less frequently, but requires rapid access when needed.
    • Standard One Zone Infrequent Access (SIA) Storage Class, which is a storage class for objects that are accessed less frequently, but requires rapid access when needed.
    • S3 Intelligent Tiering Storage Class, which is a storage class for objects that are accessed less frequently, but requires rapid access when needed.
    • Glacier Storage Class, which is a storage class for objects that are accessed less frequently, but requires rapid access when needed.
    • S3 Glacier Deep Archive Storage Class, which is a storage class for objects that are accessed less frequently, but requires rapid access when needed.
    • S3 Glacier Flexible Storage Class, which is a storage class for objects that are accessed less frequently, but requires rapid access when needed.
  • Static Website Hosting, which is a feature that allows you to host a static website on S3. This is useful for applications that require a website to be hosted.
  • Lifecycle Management, which is a feature that allows you to automatically move objects between storage tiers or delete objects after a certain period of time. This is useful for applications that require a rollback or recovery of data.
  • Encryption of objects at rest using server-side encryption with Amazon S3-managed keys (SSE-S3) or AWS Key Management Service-managed keys (SSE-KMS) or client-side encryption with AWS KMS-managed keys (SSE-C) or customer-provided encryption keys (CSE-C). S3 Replication, which is a feature that allows you to replicate objects across buckets or across AWS accounts.
  • Cross-Region Replication, which is a feature that allows you to replicate objects across buckets or across AWS accounts.
  • Pre-signed URLs, which are URLs that provide temporary access to objects in S3.
  • Access points, which are unique URLs for an object in S3 that can be shared with others.
    • Multi-Region Access Points which are unique URLs for an object in S3 that can be shared with others.

As you can see, Amazon S3 is a very powerful and flexible service. It is cost effective, scalable and resilient. It is a great service to use for a Data Lake, or for storing large volumes of Media Files--audio, video, photos, or for a myriad of other purposes. More details may be found at: https://aws.amazon.com/s3/

Top comments (0)