Skip to main content

Get Object Storage with Amazon S3

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe the function and features of Amazon Simple Storage Service (S3).
  • Explain Amazon S3 concepts, such as S3 buckets and objects.
  • Explain uses cases for Amazon S3.

Now that you’ve solved the storage issue for your cat photo application, you can rest easy… except you can’t stop thinking about how EBS snapshots get stored in Amazon Simple Storage Service (Amazon S3). Now, you’re wondering, what is Amazon S3?

This unit covers Amazon S3, what it’s used for, and some of the important concepts you need to know to use it effectively. 

What Is Amazon S3?

Unlike Amazon EBS, Amazon S3 is a standalone storage solution that isn’t tied to compute. It enables you to retrieve your data from anywhere on the web. If you’ve ever used an online storage service to back up the data from your local machine, then you most likely have used a service similar to Amazon S3. The big difference between those online storage services and Amazon S3 is the storage type. 

Amazon S3 is an object storage service. As mentioned in the first unit, object storage stores data in a flat structure, using unique identifiers to look up objects when requested. In that unit, you also learned that an object is simply a file combined with metadata and that you can store as many of these objects as you’d like. All of these characteristics of object storage are also characteristics of Amazon S3. 

Understand Amazon S3 Concepts

In Amazon S3, you have to store your objects in containers called buckets. You can’t upload any object, not even a single cat photo, to S3 without creating a bucket first. When you create an bucket, you choose, at the very minimum, two things: the bucket name and the AWS Region you want the bucket to reside in. 

Screenshot of creating an Amazon S3 bucket, showing the Create bucket screen, General configuration where you input your chosen bucket name and region.The first part is choosing the Region you want the bucket to reside in. Typically, this will be a Region that you’ve used for other resources, such as your compute. When you choose a Region for your bucket, all objects you put inside that bucket are redundantly stored across multiple devices, across multiple Availability Zones. This level of redundancy is designed to provide Amazon S3 customers with 99.999999999% durability and 99.99% availability for objects over a given year.

The second part is choosing a bucket name which must be unique across all AWS accounts. AWS stops you from choosing a bucket name that has already been chosen by someone else in another AWS account. Once you choose a name, that name is yours and cannot be claimed by anyone else unless you delete that bucket, which then releases the name for others to use.

AWS uses this name as part of the object identifier. In S3, each object is identified using a URL, which looks like this:
A URL that uniquely identifies an object as described in the next paragraphAfter the http://, you see the bucket name. In this example, the bucket is named doc. Then, the identifier uses the service name, s3 and specifies the service provider amazonaws. After that, you have an implied folder inside the bucket called 2006-03-01 and the object inside the folder that is named AmazonS3.html. The object name is often referred to as the key name.

Note, you can have folders inside of buckets to help you organize objects. However, remember that there’s no actual file hierarchy that supports this on the back end. It is instead a flat structure where all files and folders live at the same level. Using buckets and folders implies a hierarchy, which makes it easy to understand for the human eye.

S3 Use Cases

Amazon S3 is one of the most widely used storage services, with far more use cases than could fit on one screen. The following list summarizes some of the most common ways you can use Amazon S3. 

  • Backup and storage: S3 is a natural place to back up files because it is highly redundant. As mentioned in the last unit, AWS stores your EBS snapshots in S3 to take advantage of its high availability.
  • Media hosting: Because you can store unlimited objects, and each individual object can be up to 5 TBs, S3 is an ideal location to host video, photo, or music uploads.
  • Software delivery: You can use S3 to host your software applications that customers can download.
  • Data lakes: S3 is an optimal foundation for a data lake because of its virtually unlimited scalability. You can increase storage from gigabytes to petabytes of content, paying only for what you use.
  • Static websites: You can configure your bucket to host a static website of HTML, CSS, and client-side scripts.
  • Cat photos: Because of the limitless scaling, the support for large files, and the fact that you access any object over the web at any time, S3 is the perfect place to store cat photos.

Instead of storing cat photos directly on the server or using Amazon EBS, why not take advantage of the benefits listed above? Using S3 to store your cat photos will offload the static content away from the application, and allow you to take advantage of the redundancy that S3 provides. 

Wrap Up

Amazon S3 is often referred to as storage for the internet, since it identifies objects using a URL that you can access anywhere on the web. In the next unit, you learn more about S3, including how to best secure it. 

Resources

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios