Simple Storage Service (S3)
-
It is Object-based storage, i.e., you can store the images, word files, pdf files, etc.
-
The files which are stored in S3 can be from 0 Bytes to 5 TB.
-
It has unlimited storage means that you can store the data as much you want.
-
Files are stored in Bucket. A bucket is like a folder available in S3 that stores the files.
-
S3 is a universal namespace, i.e., the names must be unique globally. Bucket contains a DNS address. Therefore, the bucket must contain a unique name to generate a unique DNS address.
-
If you create a bucket, URL look like:
-
If you upload a file to S3 bucket, then you will receive an HTTP 200 code means that the uploading of a file is successful.
-
Supports encryption and automatic data classification(S3 to Glacier if data not using for 3 months)
S3 Concepts
S3 is object-based. Objects consist of the following:
-
Buckets - Container for storing files
-
Regions - if we create bucket, we must put it in a region where users can frequently access
-
Objects - Just Files
-
Keys - Each Object has a Key. Kind of file name.
-
Object URLs - Share Object publicly via URL
-
consistency - It data modified in one region automatically updated in other regions
-
Key: It is simply the name of the object. For example, hello.txt, spreadsheet.xlsx, etc. You can use the key to retrieve the object.
-
Value: It is simply the data which is made up of a sequence of bytes. It is a data inside the file.
-
Version ID: Version ID uniquely identifies the object
-
Metadata: It is the data about data that you are storing. A set of a name-value pair with which you can store the information regarding an object.
-
Subresources: Subresource mechanism is used to store object-specific information.
-
Access control information: You can put the permissions individually on your files.
Very Good example use of S3 is “static website hosting”, it will have a Object URL
How S3 Storage Works
Before adding any data in S3 the user must create a bucket which will be used to store objects.
-
A Bucket is a logical unit of storage in S3(like Folder).
-
A Bucket contains objects which contain the data and metadata(Key+version+etc).
When you are creating a Bucket keep note about below factors
-
Pricing
-
User/Customer Location - make sure bucket is near to user access location
-
Latency - less distance – good latency
-
Service Availability